Class: CrossOrigen::Headers

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(owner) ⇒ Headers

Returns a new instance of Headers.



6
7
8
# File 'lib/cross_origen/headers.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/headers.rb', line 4

def owner
  @owner
end

Instance Method Details

#owner_to_header(_options = {}) ⇒ Object

Returns a string representing the owner as a C header



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

def owner_to_header(_options = {})
  Origen.compile("#{path_to_templates}/headers/default.h.erb", scope: owner)
end