Class: Reve::Classes::CorporateMemberMedal

Inherits:
Medal show all
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

Attributes inherited from Medal

#id, #issued_at

Instance Method Summary collapse

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_idObject (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_idObject (readonly)

Returns the value of attribute issuer_id.



887
888
889
# File 'lib/reve/classes.rb', line 887

def issuer_id
  @issuer_id
end

#reasonObject (readonly)

Returns the value of attribute reason.



887
888
889
# File 'lib/reve/classes.rb', line 887

def reason
  @reason
end

#statusObject (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)

Returns:

  • (Boolean)


900
901
902
# File 'lib/reve/classes.rb', line 900

def is_private?
  ! is_public?
end

#is_public?Boolean

If the CharacterMedal is public

Returns:

  • (Boolean)


896
897
898
# File 'lib/reve/classes.rb', line 896

def is_public?
  @status == "public"
end