Class: Declarative::Definitions::Definition
- Inherits:
-
Object
- Object
- Declarative::Definitions::Definition
- Defined in:
- lib/declarative/definitions.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
TODO: are we gonna keep this?.
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(name, options = {}, &block) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(name, options = {}, &block) ⇒ Definition
Returns a new instance of Definition.
4 5 6 7 |
# File 'lib/declarative/definitions.rb', line 4 def initialize(name, ={}, &block) @options = .clone @options[:name] = name.to_s end |
Instance Attribute Details
#options ⇒ Object (readonly)
TODO: are we gonna keep this?
9 10 11 |
# File 'lib/declarative/definitions.rb', line 9 def @options end |
Instance Method Details
#[](name) ⇒ Object
11 12 13 |
# File 'lib/declarative/definitions.rb', line 11 def [](name) @options[name] end |