Class: FieldMapper::Types::Plat
- Inherits:
-
Object
- Object
- FieldMapper::Types::Plat
- Extended by:
- Forwardable
- Defined in:
- lib/field_mapper/types/plat.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type, values = []) ⇒ Plat
constructor
A new instance of Plat.
- #name ⇒ Object
Constructor Details
#initialize(type, values = []) ⇒ Plat
Returns a new instance of Plat.
19 20 21 22 23 24 25 |
# File 'lib/field_mapper/types/plat.rb', line 19 def initialize(type, values=[]) if type.class != Class || !type.ancestors.include?(FieldMapper::Standard::Plat) raise InvalidPlatType.new("#{type} is not a valid plat type") end @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/field_mapper/types/plat.rb', line 9 def type @type end |
Class Method Details
Instance Method Details
#name ⇒ Object
27 28 29 |
# File 'lib/field_mapper/types/plat.rb', line 27 def name self.class.name end |