Class: Veneer::Base::Property

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/veneer/base/property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, properties) ⇒ Property

Returns a new instance of Property.



13
14
15
16
# File 'lib/veneer/base/property.rb', line 13

def initialize(parent, properties)
  @parent = parent
  super properties.merge(:type => normalize(properties[:type]))
end

Instance Attribute Details

#parentObject (readonly)

Returns the value of attribute parent.



4
5
6
# File 'lib/veneer/base/property.rb', line 4

def parent
  @parent
end

Instance Method Details

#normalize(properties) ⇒ Object



18
19
20
# File 'lib/veneer/base/property.rb', line 18

def normalize(properties)
  ::Kernel.raise ::Veneer::Errors::NotImplemented
end

#validatorsObject



22
23
24
# File 'lib/veneer/base/property.rb', line 22

def validators
  parent.validators_on(name)
end