Class: Reve::Classes::CharacterMedal
Overview
Composed in CharacterMedals. Issued by the Corporation the Character is a member Attributes:
-
reason ( String ) - Why the CharacterMedal was issued
-
issuer_id ( Fixnum ) - Who issued the CharacterMedal
-
status ( String ) - public or private (presumably), if this CharacterMedal is public or private.
See Also: Medal, CharacterOtherCorporateMedal, CorporateMemberMedal, CorporateMedal
Direct Known Subclasses
Instance Attribute Summary collapse
-
#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) ⇒ CharacterMedal
constructor
:nodoc:.
-
#is_private? ⇒ Boolean
If the CharacterMedal is private (not public).
-
#is_public? ⇒ Boolean
If the CharacterMedal is public.
Constructor Details
#initialize(elem) ⇒ CharacterMedal
:nodoc:
847 848 849 850 851 852 |
# File 'lib/reve/classes.rb', line 847 def initialize(elem) #:nodoc: super(elem) @reason = elem["reason"] @issuer_id = elem["issuerID"].to_i @status = elem["status"] end |
Instance Attribute Details
#issuer_id ⇒ Object (readonly)
Returns the value of attribute issuer_id.
846 847 848 |
# File 'lib/reve/classes.rb', line 846 def issuer_id @issuer_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
846 847 848 |
# File 'lib/reve/classes.rb', line 846 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
846 847 848 |
# File 'lib/reve/classes.rb', line 846 def status @status end |
Instance Method Details
#is_private? ⇒ Boolean
If the CharacterMedal is private (not public)
858 859 860 |
# File 'lib/reve/classes.rb', line 858 def is_private? ! is_public? end |
#is_public? ⇒ Boolean
If the CharacterMedal is public
854 855 856 |
# File 'lib/reve/classes.rb', line 854 def is_public? @status == "public" end |