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:
888 889 890 891 892 893 894 |
# File 'lib/reve/classes.rb', line 888 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.
887 888 889 |
# File 'lib/reve/classes.rb', line 887 def character_id @character_id end |
#issuer_id ⇒ Object (readonly)
Returns the value of attribute issuer_id.
887 888 889 |
# File 'lib/reve/classes.rb', line 887 def issuer_id @issuer_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
887 888 889 |
# File 'lib/reve/classes.rb', line 887 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
887 888 889 |
# File 'lib/reve/classes.rb', line 887 def status @status end |
Instance Method Details
#is_private? ⇒ Boolean
If the CorporateMemberMedal is private (not public)
900 901 902 |
# File 'lib/reve/classes.rb', line 900 def is_private? ! is_public? end |
#is_public? ⇒ Boolean
If the CharacterMedal is public
896 897 898 |
# File 'lib/reve/classes.rb', line 896 def is_public? @status == "public" end |