Class: Reve::Classes::CorporationSheet
Overview
Describes a Corporation. The public listing when a Corporation is in an Alliance is limited. When the requestor is in the Corporation for which the CorporationSheet is for then the details are full. Attributes
-
id ( Fixnum ) - ID of the Corporation
-
name ( String ) - Name of the Corporation
-
ticker ( String ) - Ticker (short name) of the Corporation
-
ceo_id ( Fixnum ) - The ID of the Character who is the CEO of the Corporation
-
ceo_name ( String ) - The name of the Character whois he CEO of the Corporation
-
station_id ( Fixnum ) - The ID of the Corporation’s home Station
-
station_name ( Station ) - The name of the Corporation’s home Station
-
description ( String ) - Corporation’s description
-
url ( String ) - URL of the Corporation’s website. If none is set the value is an empty String
-
alliance_id ( Fixnum | NilClass ) - ID of the Alliance that this Corporation belongs to; nil if no membership
-
alliance_name ( String | NilClass ) - Name of the Alliance that this Corporation belongs to; nil if no membership
-
tax_rate ( Float ) - Tax rate for the Corporation
-
member_count ( Fixnum ) - How many Characters are in the Corporation
-
member_limit ( Fixnum ) - Member limit (Max number of Characters allowed in?)
-
shares ( Fixnum ) - Number of shares available for the Corporation
-
divisions ( [CorporateDivision] ) - Array of CorporateDivision objects representing the differet divisions in the Corporation
-
wallet_divisions ( [WalletDivision] ) - Array of WalletDivision objects representing the different divisions in the wallet for the Corporation
-
logo ( CorporateLogo ) - An object to represent the Corporation’s logo.
See Also: CorporateLogo, WalletDivision, CorporateDivision, Corporation, Reve::API#corporation_sheet
Instance Attribute Summary collapse
-
#alliance_id ⇒ Object
readonly
Returns the value of attribute alliance_id.
-
#alliance_name ⇒ Object
readonly
Returns the value of attribute alliance_name.
-
#ceo_id ⇒ Object
readonly
Returns the value of attribute ceo_id.
-
#ceo_name ⇒ Object
readonly
Returns the value of attribute ceo_name.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#divisions ⇒ Object
Returns the value of attribute divisions.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#member_count ⇒ Object
readonly
Returns the value of attribute member_count.
-
#member_limit ⇒ Object
readonly
Returns the value of attribute member_limit.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#shares ⇒ Object
readonly
Returns the value of attribute shares.
-
#station_id ⇒ Object
readonly
Returns the value of attribute station_id.
-
#station_name ⇒ Object
readonly
Returns the value of attribute station_name.
-
#tax_rate ⇒ Object
readonly
Returns the value of attribute tax_rate.
-
#ticker ⇒ Object
readonly
Returns the value of attribute ticker.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#wallet_divisions ⇒ Object
Returns the value of attribute wallet_divisions.
Instance Method Summary collapse
-
#initialize(h, divisions = [], wallet_divisions = [], logo = Reve::Classes::CorporateLogo.new(Hash.new(0))) ⇒ CorporationSheet
constructor
Call it
h
here cos it’s a Hash and not any Hpricot object like in other constructors.
Constructor Details
#initialize(h, divisions = [], wallet_divisions = [], logo = Reve::Classes::CorporateLogo.new(Hash.new(0))) ⇒ CorporationSheet
Call it h
here cos it’s a Hash and not any Hpricot object like in other constructors
781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 |
# File 'lib/reve/classes.rb', line 781 def initialize(h, divisions = [],wallet_divisions = [], logo =Reve::Classes::CorporateLogo.new(Hash.new(0)) ) #:nodoc: @divisions = divisions @wallet_divisions = wallet_divisions @logo = logo @id = h[:id].to_i @name = h[:name] @ticker = h[:ticker] @ceo_id = h[:ceo_id].to_i @ceo_name = h[:ceo_name] @station_id = h[:station_id].to_i @station_name = h[:station_name] @description = h[:description].split(/\n/).collect { |s| s.strip }.join(' ') # newlines to spaces @url = h[:url] || "" @alliance_id = h[:alliance_id].to_i rescue nil @alliance_name = h[:alliance_name] rescue nil @tax_rate = h[:tax_rate].to_f @member_count = h[:member_count].to_i @member_limit = h[:member_limit].to_i @shares = h[:shares].to_i end |
Instance Attribute Details
#alliance_id ⇒ Object (readonly)
Returns the value of attribute alliance_id.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def alliance_id @alliance_id end |
#alliance_name ⇒ Object (readonly)
Returns the value of attribute alliance_name.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def alliance_name @alliance_name end |
#ceo_id ⇒ Object (readonly)
Returns the value of attribute ceo_id.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def ceo_id @ceo_id end |
#ceo_name ⇒ Object (readonly)
Returns the value of attribute ceo_name.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def ceo_name @ceo_name end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def description @description end |
#divisions ⇒ Object
Returns the value of attribute divisions.
778 779 780 |
# File 'lib/reve/classes.rb', line 778 def divisions @divisions end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def id @id end |
#logo ⇒ Object
Returns the value of attribute logo.
778 779 780 |
# File 'lib/reve/classes.rb', line 778 def logo @logo end |
#member_count ⇒ Object (readonly)
Returns the value of attribute member_count.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def member_count @member_count end |
#member_limit ⇒ Object (readonly)
Returns the value of attribute member_limit.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def member_limit @member_limit end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def name @name end |
#shares ⇒ Object (readonly)
Returns the value of attribute shares.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def shares @shares end |
#station_id ⇒ Object (readonly)
Returns the value of attribute station_id.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def station_id @station_id end |
#station_name ⇒ Object (readonly)
Returns the value of attribute station_name.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def station_name @station_name end |
#tax_rate ⇒ Object (readonly)
Returns the value of attribute tax_rate.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def tax_rate @tax_rate end |
#ticker ⇒ Object (readonly)
Returns the value of attribute ticker.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def ticker @ticker end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
776 777 778 |
# File 'lib/reve/classes.rb', line 776 def url @url end |
#wallet_divisions ⇒ Object
Returns the value of attribute wallet_divisions.
778 779 780 |
# File 'lib/reve/classes.rb', line 778 def wallet_divisions @wallet_divisions end |