Class: Tankard::Api::Style
- Inherits:
-
Object
- Object
- Tankard::Api::Style
- Includes:
- Enumerable, Request::Get, Utils::Find, Utils::PageFinders
- Defined in:
- lib/tankard/api/style.rb
Overview
Access for the /style route on brewerydb
Instance Method Summary collapse
-
#each {|hash| ... } ⇒ Object
Calls the given block once for each style.
-
#find(id_or_array, options = {}) ⇒ Hash, Array
Find a single or multiple styles by their id.
-
#id(style_id) ⇒ self
Style id to query.
-
#initialize(request, options = {}) ⇒ Tankard::Api::Style
constructor
Initializes a new object.
Constructor Details
#initialize(request, options = {}) ⇒ Tankard::Api::Style
Initializes a new object
23 24 25 26 |
# File 'lib/tankard/api/style.rb', line 23 def initialize(request, = {}) @http_client = request @http_request_parameters = Hashie::Mash.new() end |
Instance Method Details
#each {|hash| ... } ⇒ Object
Calls the given block once for each style
|
# File 'lib/tankard/api/style.rb', line 37
|
#find(id_or_array, options = {}) ⇒ Hash, Array
Find a single or multiple styles by their id
|
# File 'lib/tankard/api/style.rb', line 28
|
#id(style_id) ⇒ self
Style id to query
51 52 53 54 |
# File 'lib/tankard/api/style.rb', line 51 def id(style_id) @http_request_parameters.id = style_id self end |