Class: DataPackage::Field

Inherits:
Base
  • Object
show all
Defined in:
lib/data_package/field.rb

Constant Summary collapse

Types =
Set.new([
  :any, :string, :number, :integer,
  :date, :time, :datetime, :boolean, :binary,
  :object, :geopoint, :geojson, :array
])

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from AttrHelper::Serialization

#to_hash, #to_json

Methods included from AttrHelper::Base

#attr_missing?, #attr_present?, #attr_required?, #attributes, included, #missing_attributes, #optional_attributes, #required_attributes, #write_attribute, #write_attributes

Constructor Details

This class inherits a constructor from DataPackage::Base

Instance Method Details

#type=(value) ⇒ Object



18
19
20
# File 'lib/data_package/field.rb', line 18

def type=(value)
  write_attribute(:type, value.to_sym)
end