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

- (CorporateMemberMedal) initialize(elem)

:nodoc:



931
932
933
934
935
936
937
# File 'lib/reve/classes.rb', line 931

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

- (Object) character_id (readonly)

Returns the value of attribute character_id



930
931
932
# File 'lib/reve/classes.rb', line 930

def character_id
  @character_id
end

- (Object) issuer_id (readonly)

Returns the value of attribute issuer_id



930
931
932
# File 'lib/reve/classes.rb', line 930

def issuer_id
  @issuer_id
end

- (Object) reason (readonly)

Returns the value of attribute reason



930
931
932
# File 'lib/reve/classes.rb', line 930

def reason
  @reason
end

- (Object) status (readonly)

Returns the value of attribute status



930
931
932
# File 'lib/reve/classes.rb', line 930

def status
  @status
end

Instance Method Details

- (Boolean) is_private?

If the CorporateMemberMedal is private (not public)

Returns:

  • (Boolean)


943
944
945
# File 'lib/reve/classes.rb', line 943

def is_private?
  ! is_public?
end

- (Boolean) is_public?

If the CharacterMedal is public

Returns:

  • (Boolean)


939
940
941
# File 'lib/reve/classes.rb', line 939

def is_public?
  @status == "public"
end