Class: Reve::Classes::CharacterInfo
Overview
Represents a CharacterInfo for Reve::API#character_info Basic Attributes
-
id ( Fixnum ) - ID of the Character
-
name ( String ) - Name of the Character
-
race ( String ) - Race of the Character
-
bloodline ( String ) - Bloodline of the Character
-
corporation_id ( Fixnum ) - ID of the Corporation the Character is in
-
corporation_name ( String ) - Name of the Corporation the Character is in
-
corporation_date ( Time ) - Date the Character joined his Corporation
-
alliance_id ( Fixnum | NilClass ) - The ID of the Alliance the Character is in, if any. Will be nil unless the victim was in an Alliance
-
alliance_name ( String | NilClass ) - Name of the Alliance the Character is in, if any.
-
alliance_date ( Time | NilClass ) - Date the Character’s Corporations joined the Alliance.
-
security_status ( Float ) - Security status of the Character
Limited Attributes
-
skillpoints ( Fixnum ) - The amount of Skillpoints
-
skill_training_ends ( Time )-
-
ship_name ( String ) -
-
ship_type_id ( Fixnum ) -
-
ship_type_name ( String ) -
Full Attributes
-
last_known_location ( String ) -
-
acount_balance ( Float )
Instance Attribute Summary collapse
-
#acount_balance ⇒ Object
readonly
Returns the value of attribute acount_balance.
-
#alliance_date ⇒ Object
readonly
Returns the value of attribute alliance_date.
-
#alliance_id ⇒ Object
readonly
Returns the value of attribute alliance_id.
-
#alliance_name ⇒ Object
readonly
Returns the value of attribute alliance_name.
-
#bloodline ⇒ Object
readonly
Returns the value of attribute bloodline.
-
#corporation_date ⇒ Object
readonly
Returns the value of attribute corporation_date.
-
#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.
-
#last_known_location ⇒ Object
readonly
Returns the value of attribute last_known_location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#race ⇒ Object
readonly
Returns the value of attribute race.
-
#security_status ⇒ Object
readonly
Returns the value of attribute security_status.
-
#ship_name ⇒ Object
readonly
Returns the value of attribute ship_name.
-
#ship_type_id ⇒ Object
readonly
Returns the value of attribute ship_type_id.
-
#ship_type_name ⇒ Object
readonly
Returns the value of attribute ship_type_name.
-
#skill_training_ends ⇒ Object
readonly
Returns the value of attribute skill_training_ends.
-
#skillpoints ⇒ Object
readonly
Returns the value of attribute skillpoints.
Instance Method Summary collapse
-
#initialize(elem) ⇒ CharacterInfo
constructor
:nodoc:.
- #type ⇒ Object
Constructor Details
#initialize(elem) ⇒ CharacterInfo
:nodoc:
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 |
# File 'lib/reve/classes.rb', line 1643 def initialize(elem) #:nodoc: @id = (elem/'characterID').inner_html.to_i @name = (elem/'characterName').inner_html @dob = (elem/'DoB').inner_html @race = (elem/'race').inner_html @bloodline = (elem/'bloodline').inner_html @ancestry = (elem/'ancestry').inner_html @corporation_id = (elem/'corporationID').inner_html.to_i @corporation_name = (elem/'corporation').inner_html @corporation_date = Time.parse((elem/'corporationDate').inner_html) @alliance_id = (elem/'allianceID').inner_html.to_i @alliance_name = (elem/'alliance').inner_html @alliance_date = Time.parse((elem/'alliancenDate').inner_html) @security_status = (elem/'securityStatus').inner_html.to_f @skillpoints = (elem/'skillPoints').inner_html == "" ? nil : (elem/'skillPoints').inner_html.to_i @skill_training_ends = (elem/'nextTrainingEnds').inner_html == "" ? nil : Time.parse((elem/'nextTrainingEnds').inner_html) @ship_name = (elem/'shipName').inner_html == "" ? nil : (elem/'shipName').inner_html @ship_type_id = (elem/'shipTypeID').inner_html == "" ? nil : (elem/'shipTypeID').inner_html.to_i @ship_type_name = (elem/'shipTypeName').inner_html == "" ? nil : (elem/'shipTypeName').inner_html @last_known_location = (elem/'lastKnownLocation').inner_html == "" ? nil : (elem/'lastKnownLocation').inner_html @acount_balance = (elem/'accountBalance').inner_html == "" ? nil : (elem/'accountBalance').inner_html.to_f end |
Instance Attribute Details
#acount_balance ⇒ Object (readonly)
Returns the value of attribute acount_balance.
1641 1642 1643 |
# File 'lib/reve/classes.rb', line 1641 def acount_balance @acount_balance end |
#alliance_date ⇒ Object (readonly)
Returns the value of attribute alliance_date.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def alliance_date @alliance_date end |
#alliance_id ⇒ Object (readonly)
Returns the value of attribute alliance_id.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def alliance_id @alliance_id end |
#alliance_name ⇒ Object (readonly)
Returns the value of attribute alliance_name.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def alliance_name @alliance_name end |
#bloodline ⇒ Object (readonly)
Returns the value of attribute bloodline.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def bloodline @bloodline end |
#corporation_date ⇒ Object (readonly)
Returns the value of attribute corporation_date.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def corporation_date @corporation_date end |
#corporation_id ⇒ Object (readonly)
Returns the value of attribute corporation_id.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def corporation_id @corporation_id end |
#corporation_name ⇒ Object (readonly)
Returns the value of attribute corporation_name.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def corporation_name @corporation_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def id @id end |
#last_known_location ⇒ Object (readonly)
Returns the value of attribute last_known_location.
1641 1642 1643 |
# File 'lib/reve/classes.rb', line 1641 def last_known_location @last_known_location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def name @name end |
#race ⇒ Object (readonly)
Returns the value of attribute race.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def race @race end |
#security_status ⇒ Object (readonly)
Returns the value of attribute security_status.
1639 1640 1641 |
# File 'lib/reve/classes.rb', line 1639 def security_status @security_status end |
#ship_name ⇒ Object (readonly)
Returns the value of attribute ship_name.
1640 1641 1642 |
# File 'lib/reve/classes.rb', line 1640 def ship_name @ship_name end |
#ship_type_id ⇒ Object (readonly)
Returns the value of attribute ship_type_id.
1640 1641 1642 |
# File 'lib/reve/classes.rb', line 1640 def ship_type_id @ship_type_id end |
#ship_type_name ⇒ Object (readonly)
Returns the value of attribute ship_type_name.
1640 1641 1642 |
# File 'lib/reve/classes.rb', line 1640 def ship_type_name @ship_type_name end |
#skill_training_ends ⇒ Object (readonly)
Returns the value of attribute skill_training_ends.
1640 1641 1642 |
# File 'lib/reve/classes.rb', line 1640 def skill_training_ends @skill_training_ends end |
#skillpoints ⇒ Object (readonly)
Returns the value of attribute skillpoints.
1640 1641 1642 |
# File 'lib/reve/classes.rb', line 1640 def skillpoints @skillpoints end |
Instance Method Details
#type ⇒ Object
1667 1668 1669 1670 1671 1672 1673 1674 1675 |
# File 'lib/reve/classes.rb', line 1667 def type if self.acount_balance return :full elsif self.skillpoints return :limited else return :basic end end |