Class: Me2API::Person

Inherits:
Model
  • Object
show all
Defined in:
lib/me2api/model/person.rb

Constant Summary

Constants inherited from Model

Model::FROM_OR_TO_REGEX

Instance Method Summary collapse

Methods inherited from Model

#[]=, #id, #initialize, #iso8601_time, #method_missing, #type, #underscore, wrap

Constructor Details

This class inherits a constructor from Me2API::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Me2API::Model

Instance Method Details

#registeredObject



5
6
7
8
9
10
# File 'lib/me2api/model/person.rb', line 5

def registered
  unless self[:registered].is_a?(Time)
    self[:registered] = Time.parse(self[:registered])
  end
  self[:registered]
end

#updatedObject



12
13
14
15
16
17
# File 'lib/me2api/model/person.rb', line 12

def updated
  unless self[:updated].is_a?(Time)
    self[:updated] = iso8601_time(self[:updated])
  end
  self[:updated]
end