Class: GunBroker::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/gun_broker/item.rb

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Item

Returns a new instance of Item



4
5
6
# File 'lib/gun_broker/item.rb', line 4

def initialize(attrs = {})
  @attrs = attrs
end

Instance Method Details

#[](key) ⇒ Object



12
13
14
# File 'lib/gun_broker/item.rb', line 12

def [](key)
  @attrs[key]
end

#idObject



8
9
10
# File 'lib/gun_broker/item.rb', line 8

def id
  @attrs['itemID']
end