Class: PincasterLayer
- Inherits:
-
Object
- Object
- PincasterLayer
- Defined in:
- lib/pincaster_layer.rb
Instance Attribute Summary collapse
-
#layer_hash ⇒ Object
readonly
Returns the value of attribute layer_hash.
Instance Method Summary collapse
-
#initialize(layer_array) ⇒ PincasterLayer
constructor
A new instance of PincasterLayer.
-
#splat_layer ⇒ Object
provides an accessor for every pin value that came back from Pincaster.
Constructor Details
#initialize(layer_array) ⇒ PincasterLayer
Returns a new instance of PincasterLayer.
5 6 7 8 |
# File 'lib/pincaster_layer.rb', line 5 def initialize(layer_array) @layer_hash = layer_array.first splat_layer end |
Instance Attribute Details
#layer_hash ⇒ Object (readonly)
Returns the value of attribute layer_hash.
3 4 5 |
# File 'lib/pincaster_layer.rb', line 3 def layer_hash @layer_hash end |
Instance Method Details
#splat_layer ⇒ Object
provides an accessor for every pin value that came back from Pincaster
11 12 13 14 15 16 |
# File 'lib/pincaster_layer.rb', line 11 def splat_layer @layer_hash.each_pair do |key, value| self.class.send(:attr_accessor, key.to_sym) self.send(key.to_s + "=", value) end end |