class Dgrid::API::Person
Attributes
birth_date[RW]
death_date[RW]
ext_id[RW]
gender[RW]
Public Class Methods
db_fields()
click to toggle source
# File lib/dgrid/api/person.rb, line 18 def self.db_fields %w(id name description gender birth_date death_date) end
new(options)
click to toggle source
Calls superclass method
Dgrid::API::NamedEntity::new
# File lib/dgrid/api/person.rb, line 12 def initialize(options) parent_opts, my_opts = split_hash(options,[:id, :name, :description]) super(parent_opts) set_members_from_hash(my_opts) end
pluralized()
click to toggle source
# File lib/dgrid/api/person.rb, line 23 def self.pluralized 'people' end
Public Instance Methods
to_hash()
click to toggle source
Calls superclass method
Dgrid::API::NamedEntity#to_hash
# File lib/dgrid/api/person.rb, line 28 def to_hash h = super h.merge({ :gender => gender, :birth_date => birth_date, :death_date => death_date, :ext_id => ext_id }) end