Module: SimpleAdvice
- Defined in:
- lib/simple_advice.rb,
lib/simple_advice/error.rb,
lib/simple_advice/client.rb,
lib/simple_advice/config.rb,
lib/simple_advice/object.rb,
lib/simple_advice/version.rb,
lib/simple_advice/collection.rb,
lib/simple_advice/objects/advice.rb
Defined Under Namespace
Classes: Advice, Client, Collection, Config, Error, Object
Constant Summary
collapse
- VERSION =
"0.1.1"
Class Method Summary
collapse
Class Method Details
.find(advice_id:) ⇒ Object
24
25
26
27
|
# File 'lib/simple_advice.rb', line 24
def find(advice_id:)
advice_obj = JSON.parse(Client.get_request("advice/#{advice_id}").body)["slip"]
advice_obj ? Advice.new(advice_obj) : nil
end
|