Class: Camdram::Person
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#slug ⇒ Object
Returns the value of attribute slug.
Attributes included from API
Attributes inherited from Base
Class Method Summary collapse
-
.url ⇒ String
Returns the URL stub assocaited with all people.
Instance Method Summary collapse
-
#info ⇒ Hash
Return a hash of the person's attributes.
-
#url_slug ⇒ String
Returns the URL+slug of the person.
Methods included from API
Methods inherited from Base
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/camdram/person.rb', line 7 def name @name end |
#slug ⇒ Object
Returns the value of attribute slug.
7 8 9 |
# File 'lib/camdram/person.rb', line 7 def slug @slug end |
Class Method Details
.url ⇒ String
Returns the URL stub assocaited with all people
30 31 32 |
# File 'lib/camdram/person.rb', line 30 def self.url '/people' end |
Instance Method Details
#info ⇒ Hash
Return a hash of the person's attributes
12 13 14 15 16 17 18 |
# File 'lib/camdram/person.rb', line 12 def info { id: id, name: name, slug: slug, } end |
#url_slug ⇒ String
Returns the URL+slug of the person
23 24 25 |
# File 'lib/camdram/person.rb', line 23 def url_slug "#{self.class.url}/#{slug}.json" end |