Class: Camdram::Role
Instance Attribute Summary collapse
-
#order ⇒ Object
Returns the value of attribute order.
-
#person ⇒ Object
Returns the value of attribute person.
-
#person_name ⇒ Object
Returns the value of attribute person_name.
-
#person_slug ⇒ Object
Returns the value of attribute person_slug.
-
#role ⇒ Object
Returns the value of attribute role.
-
#show ⇒ Object
Returns the value of attribute show.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Base
Instance Method Summary collapse
-
#info ⇒ Hash
Return a hash of the roles's attributes.
-
#initialize(options = {}) ⇒ Camdram::Role
constructor
Instantiate a new Role object from a JSON hash.
Constructor Details
#initialize(options = {}) ⇒ Camdram::Role
Instantiate a new Role object from a JSON hash
14 15 16 17 18 |
# File 'lib/camdram/role.rb', line 14 def initialize( = {}) super() @show = Show.new( @show ) unless @show.nil? @person = Person.new( @person ) unless @person.nil? end |
Instance Attribute Details
#order ⇒ Object
Returns the value of attribute order.
8 9 10 |
# File 'lib/camdram/role.rb', line 8 def order @order end |
#person ⇒ Object
Returns the value of attribute person.
8 9 10 |
# File 'lib/camdram/role.rb', line 8 def person @person end |
#person_name ⇒ Object
Returns the value of attribute person_name.
8 9 10 |
# File 'lib/camdram/role.rb', line 8 def person_name @person_name end |
#person_slug ⇒ Object
Returns the value of attribute person_slug.
8 9 10 |
# File 'lib/camdram/role.rb', line 8 def person_slug @person_slug end |
#role ⇒ Object
Returns the value of attribute role.
8 9 10 |
# File 'lib/camdram/role.rb', line 8 def role @role end |
#show ⇒ Object
Returns the value of attribute show.
8 9 10 |
# File 'lib/camdram/role.rb', line 8 def show @show end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/camdram/role.rb', line 8 def type @type end |
Instance Method Details
#info ⇒ Hash
Return a hash of the roles's attributes
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/camdram/role.rb', line 23 def info { person_name: person_name, person_slug: person_slug, id: id, type: type, role: role, order: order, show: show, person: person, } end |