Class: CrossOrigen::Ralf

Inherits:
Object
  • Object
show all
Defined in:
lib/cross_origen/ralf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(owner) ⇒ Ralf

Returns a new instance of Ralf.



6
7
8
# File 'lib/cross_origen/ralf.rb', line 6

def initialize(owner)
  @owner = owner
end

Instance Attribute Details

#ownerObject (readonly)

Returns the object that included the CrossOrigen module



4
5
6
# File 'lib/cross_origen/ralf.rb', line 4

def owner
  @owner
end

Instance Method Details

#owner_to_ralf(options = {}) ⇒ Object

Returns a string representing the owner object in RALF format



11
12
13
# File 'lib/cross_origen/ralf.rb', line 11

def owner_to_ralf(options = {})
  Origen.compile("#{Origen.root!}/templates/ralf/default.ralf.erb", options.merge(scope: owner))
end