class Camdram::Role
Attributes
order[RW]
person[RW]
person_name[RW]
person_slug[RW]
role[RW]
show[RW]
type[RW]
Public Class Methods
new(options = {})
click to toggle source
Instantiate a new Role
object from a JSON hash
@param options [Hash] A single JSON hash with symbolized keys. @return [Camdram::Role] The new Role
object.
Calls superclass method
Camdram::Base::new
# File lib/camdram/role.rb, line 14 def initialize(options = {}) super(options) @show = Show.new( @show ) unless @show.nil? @person = Person.new( @person ) unless @person.nil? end
Public Instance Methods
info()
click to toggle source
Return a hash of the roles's attributes
@return [Hash] Hash with symbolized keys.
# 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