class Tankard::Client

Interaction point for various endpoints When querying Tankard normally there is only one of these alive at a time

@author Matthew Shafer

Public Class Methods

new(options = {}) click to toggle source
# File lib/tankard/client.rb, line 15
def initialize(options = {})
  Tankard::Configuration::KEYS.each do |key|
    instance_variable_set(:"@#{key}", options[key])
  end

  @tankard_request = Tankard::Request.new(@api_key)
end

Public Instance Methods

beer(options = {}) click to toggle source
# File lib/tankard/client.rb, line 23
def beer(options = {})
  Tankard::Api::Beer.new(@tankard_request, options)
end
beers(options = {}) click to toggle source
# File lib/tankard/client.rb, line 27
def beers(options = {})
  Tankard::Api::Beers.new(@tankard_request, options)
end
style(options = {}) click to toggle source
# File lib/tankard/client.rb, line 39
def style(options = {})
  Tankard::Api::Style.new(@tankard_request, options)
end
styles() click to toggle source
# File lib/tankard/client.rb, line 35
def styles
  Tankard::Api::Styles.new(@tankard_request)
end