Class: CrossOrigen::Headers
- Inherits:
-
Object
- Object
- CrossOrigen::Headers
- Defined in:
- lib/cross_origen/headers.rb
Instance Attribute Summary collapse
-
#owner ⇒ Object
readonly
Returns the object that included the CrossOrigen module.
Instance Method Summary collapse
-
#initialize(owner) ⇒ Headers
constructor
A new instance of Headers.
-
#owner_to_header(_options = {}) ⇒ Object
Returns a string representing the owner as a C header.
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
#owner ⇒ Object (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( = {}) Origen.compile("#{path_to_templates}/headers/default.h.erb", scope: owner) end |