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:



976
977
978
979
980
981
982
# File 'lib/reve/classes.rb', line 976

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



975
976
977
# File 'lib/reve/classes.rb', line 975

def character_id
  @character_id
end

#issuer_idObject (readonly)

Returns the value of attribute issuer_id



975
976
977
# File 'lib/reve/classes.rb', line 975

def issuer_id
  @issuer_id
end

#reasonObject (readonly)

Returns the value of attribute reason



975
976
977
# File 'lib/reve/classes.rb', line 975

def reason
  @reason
end

#statusObject (readonly)

Returns the value of attribute status



975
976
977
# File 'lib/reve/classes.rb', line 975

def status
  @status
end

Instance Method Details

#is_private?Boolean

If the CorporateMemberMedal is private (not public)

Returns:

  • (Boolean)


988
989
990
# File 'lib/reve/classes.rb', line 988

def is_private?
  ! is_public?
end

#is_public?Boolean

If the CharacterMedal is public

Returns:

  • (Boolean)


984
985
986
# File 'lib/reve/classes.rb', line 984

def is_public?
  @status == "public"
end