Class: NetObj::Pickup
- Inherits:
-
SnapItemBase
- Object
- SnapItemBase
- NetObj::Pickup
- Defined in:
- lib/snapshot/items/pickup.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Attributes inherited from SnapItemBase
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash_or_raw) ⇒ Pickup
constructor
A new instance of Pickup.
Methods inherited from SnapItemBase
#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate
Constructor Details
#initialize(hash_or_raw) ⇒ Pickup
Returns a new instance of Pickup.
9 10 11 12 13 14 15 16 |
# File 'lib/snapshot/items/pickup.rb', line 9 def initialize(hash_or_raw) @field_names = i[ x y type ] super end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/snapshot/items/pickup.rb', line 7 def type @type end |
#x ⇒ Object
Returns the value of attribute x.
7 8 9 |
# File 'lib/snapshot/items/pickup.rb', line 7 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
7 8 9 |
# File 'lib/snapshot/items/pickup.rb', line 7 def y @y end |
Class Method Details
.match_type?(type) ⇒ Boolean
18 19 20 |
# File 'lib/snapshot/items/pickup.rb', line 18 def self.match_type?(type) type == NETOBJTYPE_PICKUP end |