Class: Reve::Classes::Alliance
Overview
Represents an Alliance as it appears in the Reve::API#alliances call. Attributes
-
name ( String ) - Full Name of the Alliance
-
short_name ( String ) - Short name (ticker) of the Alliance
-
id ( Fixnum ) - The Alliance’s Eve-Online ID
-
executor_corp_id ( Fixnum ) - ID of the Corporation that’s in charge of the Alliance
-
member_count ( Fixnum ) - The number of members that are in the Alliance
-
start_date ( Time ) - When the Alliance was formed.
-
member_corporations ( [Corporation] ) - Array of the Corporation objects that belong to the Alliance.
Instance Attribute Summary collapse
-
#executor_corp_id ⇒ Object
readonly
Returns the value of attribute executor_corp_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#member_corporations ⇒ Object
Returns the value of attribute member_corporations.
-
#member_count ⇒ Object
readonly
Returns the value of attribute member_count.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#short_name ⇒ Object
readonly
Returns the value of attribute short_name.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Alliance
constructor
:nodoc:.
Constructor Details
#initialize(elem) ⇒ Alliance
:nodoc:
34 35 36 37 38 39 40 41 42 |
# File 'lib/reve/classes.rb', line 34 def initialize(elem) #:nodoc: @name = elem['name'] @short_name = elem['shortName'] @id = elem['allianceID'].to_i @executor_corp_id = elem['executorCorpID'].to_i @member_count = elem['memberCount'].to_i @start_date = elem['startDate'].to_time @member_corporations = [] end |
Instance Attribute Details
#executor_corp_id ⇒ Object (readonly)
Returns the value of attribute executor_corp_id.
32 33 34 |
# File 'lib/reve/classes.rb', line 32 def executor_corp_id @executor_corp_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
32 33 34 |
# File 'lib/reve/classes.rb', line 32 def id @id end |
#member_corporations ⇒ Object
Returns the value of attribute member_corporations.
33 34 35 |
# File 'lib/reve/classes.rb', line 33 def member_corporations @member_corporations end |
#member_count ⇒ Object (readonly)
Returns the value of attribute member_count.
32 33 34 |
# File 'lib/reve/classes.rb', line 32 def member_count @member_count end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
32 33 34 |
# File 'lib/reve/classes.rb', line 32 def name @name end |
#short_name ⇒ Object (readonly)
Returns the value of attribute short_name.
32 33 34 |
# File 'lib/reve/classes.rb', line 32 def short_name @short_name end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
32 33 34 |
# File 'lib/reve/classes.rb', line 32 def start_date @start_date end |