Class: DataPackage::Schema

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

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from AttrHelper::Serialization

#to_hash, #to_json

Methods included from AttrHelper

#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

#fields=(json) ⇒ Object



9
10
11
# File 'lib/data_package/schema.rb', line 9

def fields=(json)
  @fields = json.collect{|f| Field.new(f)}
end