Class: Reve::Classes::Alliance

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

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

Instance Method Summary collapse

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_idObject (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

#idObject (readonly)

Returns the value of attribute id.



32
33
34
# File 'lib/reve/classes.rb', line 32

def id
  @id
end

#member_corporationsObject

Returns the value of attribute member_corporations.



33
34
35
# File 'lib/reve/classes.rb', line 33

def member_corporations
  @member_corporations
end

#member_countObject (readonly)

Returns the value of attribute member_count.



32
33
34
# File 'lib/reve/classes.rb', line 32

def member_count
  @member_count
end

#nameObject (readonly)

Returns the value of attribute name.



32
33
34
# File 'lib/reve/classes.rb', line 32

def name
  @name
end

#short_nameObject (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_dateObject (readonly)

Returns the value of attribute start_date.



32
33
34
# File 'lib/reve/classes.rb', line 32

def start_date
  @start_date
end