class MapEntity::Entity
Attributes
nametag[RW]
Attributes access
type[RW]
Attributes access
Public Class Methods
new(type = "", nametag = "")
click to toggle source
# File lib/map/entity.rb, line 5 def initialize(type = "", nametag = "") @type, @nametag = type, nametag end
Public Instance Methods
==(other)
click to toggle source
Redefinition of equal operator
# File lib/map/entity.rb, line 13 def ==(other) (self.class ==other.class) && (self.state == other.state) end
Also aliased as: eql?
to_s()
click to toggle source
# File lib/map/entity.rb, line 17 def to_s() "Type: #{@type}\nName: #{@nametag}" end
Protected Instance Methods
state()
click to toggle source
# File lib/map/entity.rb, line 26 def state [type, nametag] end