Class: EOL::Instance

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

Overview

Instance of EOL HTTP client

Instance Method Summary collapse

Constructor Details

#initializeInstance

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

#productsObject



35
36
37
# File 'lib/eol_rb.rb', line 35

def products
  Products.all(@client)
end