Class: Penchant::PropertyStackBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/penchant/property_stack_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#defaultsObject (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, strip_pathing_options = false)
  PropertyStack.new(self, stack, strip_pathing_options)
end