Class: Penchant::PropertyStackBuilder
- Inherits:
-
Object
- Object
- Penchant::PropertyStackBuilder
- Defined in:
- lib/penchant/property_stack_builder.rb
Instance Attribute Summary collapse
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #create_stack_for(stack, strip_pathing_options = false) ⇒ Object
-
#initialize(defaults) ⇒ PropertyStackBuilder
constructor
A new instance of PropertyStackBuilder.
Constructor Details
#initialize(defaults) ⇒ PropertyStackBuilder
Returns a new instance of PropertyStackBuilder.
5 6 7 8 9 |
# File 'lib/penchant/property_stack_builder.rb', line 5 def initialize(defaults) @defaults = defaults @custom_properties = {} end |
Instance Attribute Details
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
3 4 5 |
# File 'lib/penchant/property_stack_builder.rb', line 3 def defaults @defaults end |
Instance Method Details
#[](key) ⇒ Object
15 16 17 |
# File 'lib/penchant/property_stack_builder.rb', line 15 def [](key) @custom_properties[key] end |
#[]=(key, value) ⇒ Object
11 12 13 |
# File 'lib/penchant/property_stack_builder.rb', line 11 def []=(key, value) @custom_properties[key] = CustomProperty.new(value) end |
#create_stack_for(stack, strip_pathing_options = false) ⇒ Object
19 20 21 |
# File 'lib/penchant/property_stack_builder.rb', line 19 def create_stack_for(stack, = false) PropertyStack.new(self, stack, ) end |