Class: Hatsrank::Marketable
- Inherits:
-
Object
- Object
- Hatsrank::Marketable
- Defined in:
- lib/hatsrank/marketable.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(client, uri) ⇒ Marketable
constructor
A new instance of Marketable.
- #listings ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(client, uri) ⇒ Marketable
Returns a new instance of Marketable.
5 6 7 8 |
# File 'lib/hatsrank/marketable.rb', line 5 def initialize(client, uri) @uri = uri.sub('http://steamcommunity.com/', '') @client = client end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
3 4 5 |
# File 'lib/hatsrank/marketable.rb', line 3 def uri @uri end |
Instance Method Details
#info ⇒ Object
14 15 16 |
# File 'lib/hatsrank/marketable.rb', line 14 def info @client.hat_info self end |
#listings ⇒ Object
10 11 12 |
# File 'lib/hatsrank/marketable.rb', line 10 def listings @client.listings self end |
#name ⇒ Object
18 19 20 |
# File 'lib/hatsrank/marketable.rb', line 18 def name listings.first.name end |