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:
542 543 544 545 546 547 |
# File 'lib/reve/classes.rb', line 542 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.
541 542 543 |
# File 'lib/reve/classes.rb', line 541 def corporation_id @corporation_id end |
#corporation_name ⇒ Object (readonly)
Returns the value of attribute corporation_name.
541 542 543 |
# File 'lib/reve/classes.rb', line 541 def corporation_name @corporation_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
541 542 543 |
# File 'lib/reve/classes.rb', line 541 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
541 542 543 |
# File 'lib/reve/classes.rb', line 541 def name @name end |