Class: Reve::Classes::Character
Overview
Represents a Character for the Reve::API#characters, Reve::API#character_name and Reve::API#character_id calls. Attributes
-
name ( String ) - Name of the Character
-
id ( Fixnum ) - ID of the Character (use this for Reve::API method calls)
-
corporation_name ( String | NilClass ) - Name of the Corporation the Character belongs to. Nil if being used for Reve::API#character_name or Reve::API#character_id
-
corporation_id ( Fixnum | NilClass ) - ID of the Corporation the Character belongs to. Nil if being used for Reve::API#character_name or Reve::API#character_id
See Also: Reve::API
Instance Attribute Summary collapse
-
#corporation_id ⇒ Object
readonly
Returns the value of attribute corporation_id.
-
#corporation_name ⇒ Object
readonly
Returns the value of attribute corporation_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Character
constructor
:nodoc:.
Constructor Details
#initialize(elem) ⇒ Character
:nodoc:
586 587 588 589 590 591 |
# File 'lib/reve/classes.rb', line 586 def initialize(elem) #:nodoc: @id = elem['characterID'].to_i @name = elem['name'] @corporation_name = elem['corporationName'] @corporation_id = elem['corporationID'].to_i end |
Instance Attribute Details
#corporation_id ⇒ Object (readonly)
Returns the value of attribute corporation_id.
585 586 587 |
# File 'lib/reve/classes.rb', line 585 def corporation_id @corporation_id end |
#corporation_name ⇒ Object (readonly)
Returns the value of attribute corporation_name.
585 586 587 |
# File 'lib/reve/classes.rb', line 585 def corporation_name @corporation_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
585 586 587 |
# File 'lib/reve/classes.rb', line 585 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
585 586 587 |
# File 'lib/reve/classes.rb', line 585 def name @name end |