Class: EOL::Instance
- Inherits:
-
Object
- Object
- EOL::Instance
- Defined in:
- lib/eol_rb.rb
Overview
Instance of EOL HTTP client
Instance Method Summary collapse
- #info(product, cycle: "") ⇒ Object
-
#initialize ⇒ Instance
constructor
A new instance of Instance.
- #products ⇒ Object
Constructor Details
#initialize ⇒ Instance
Returns a new instance of Instance.
31 32 33 |
# File 'lib/eol_rb.rb', line 31 def initialize @client = Client.new end |
Instance Method Details
#info(product, cycle: "") ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/eol_rb.rb', line 39 def info(product, cycle: "") if cycle.empty? Products.get(@client, product) else Cycle.get(@client, product, cycle) end end |
#products ⇒ Object
35 36 37 |
# File 'lib/eol_rb.rb', line 35 def products Products.all(@client) end |