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:
935 936 937 938 939 940 |
# File 'lib/reve/classes.rb', line 935 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.
934 935 936 |
# File 'lib/reve/classes.rb', line 934 def issuer_id @issuer_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
934 935 936 |
# File 'lib/reve/classes.rb', line 934 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
934 935 936 |
# File 'lib/reve/classes.rb', line 934 def status @status end |
Instance Method Details
#is_private? ⇒ Boolean
If the CharacterMedal is private (not public)
946 947 948 |
# File 'lib/reve/classes.rb', line 946 def is_private? ! is_public? end |
#is_public? ⇒ Boolean
If the CharacterMedal is public
942 943 944 |
# File 'lib/reve/classes.rb', line 942 def is_public? @status == "public" end |