class Group::Member
Attributes
id[RW]
Public Class Methods
new(pc, leader = false)
click to toggle source
# File lib/Olib/character/group.rb, line 83 def initialize(pc, leader = false) @id = pc.id @leader = leader end
Public Instance Methods
==(other)
click to toggle source
# File lib/Olib/character/group.rb, line 108 def ==(other) @id == other.id end
is(state)
click to toggle source
# File lib/Olib/character/group.rb, line 104 def is(state) status =~ state end
leader?()
click to toggle source
# File lib/Olib/character/group.rb, line 92 def leader? @leader end
name()
click to toggle source
# File lib/Olib/character/group.rb, line 96 def name ref.name.split.pop end
status()
click to toggle source
# File lib/Olib/character/group.rb, line 100 def status (ref.status.split(" ") || []).map(&:to_sym) end
to_s()
click to toggle source
# File lib/Olib/character/group.rb, line 112 def to_s "<#{name}: @leader=#{leader?} @status=#{status}>" end
Private Instance Methods
ref()
click to toggle source
# File lib/Olib/character/group.rb, line 88 def ref GameObj[@id] end