Class: Reve::Classes::CorporateMemberMedal
- Defined in:
- lib/reve/classes.rb
Overview
All of the Medals that the members of a Corporation have. Attributes:
-
character_id ( Fixnum ) - ID of the Character that has this CorporateMemberMedal
-
reason ( String ) - Why the CorporateMemberMedal is bestowed
-
issuer_id ( Fixnum ) - Who issued the CorporateMemberMedal
-
status ( String ) - public or private (presumably), if this CorporateMemberMedal is public or private.
See Also: Medal, CharacterMedal, CharacterOtherCorporateMedal, CorporateMedal
Instance Attribute Summary collapse
-
#character_id ⇒ Object
readonly
Returns the value of attribute character_id.
-
#issuer_id ⇒ Object
readonly
Returns the value of attribute issuer_id.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Medal
Instance Method Summary collapse
-
#initialize(elem) ⇒ CorporateMemberMedal
constructor
:nodoc:.
-
#is_private? ⇒ Boolean
If the CorporateMemberMedal is private (not public).
-
#is_public? ⇒ Boolean
If the CharacterMedal is public.
Constructor Details
#initialize(elem) ⇒ CorporateMemberMedal
:nodoc:
931 932 933 934 935 936 937 |
# File 'lib/reve/classes.rb', line 931 def initialize(elem) #:nodoc: super(elem) @character_id = elem["characterID"].to_i @reason = elem["reason"] @issuer_id = elem["issuerID"].to_i @status = elem["status"] end |
Instance Attribute Details
#character_id ⇒ Object (readonly)
Returns the value of attribute character_id.
930 931 932 |
# File 'lib/reve/classes.rb', line 930 def character_id @character_id end |
#issuer_id ⇒ Object (readonly)
Returns the value of attribute issuer_id.
930 931 932 |
# File 'lib/reve/classes.rb', line 930 def issuer_id @issuer_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
930 931 932 |
# File 'lib/reve/classes.rb', line 930 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
930 931 932 |
# File 'lib/reve/classes.rb', line 930 def status @status end |
Instance Method Details
#is_private? ⇒ Boolean
If the CorporateMemberMedal is private (not public)
943 944 945 |
# File 'lib/reve/classes.rb', line 943 def is_private? ! is_public? end |
#is_public? ⇒ Boolean
If the CharacterMedal is public
939 940 941 |
# File 'lib/reve/classes.rb', line 939 def is_public? @status == "public" end |