Class: Loquor::ApiCall::Show
- Inherits:
-
Loquor::ApiCall
- Object
- Loquor::ApiCall
- Loquor::ApiCall::Show
- Defined in:
- lib/loquor/api_calls/show.rb
Instance Attribute Summary
Attributes inherited from Loquor::ApiCall
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(klass, id) ⇒ Show
constructor
A new instance of Show.
Constructor Details
#initialize(klass, id) ⇒ Show
Returns a new instance of Show.
4 5 6 7 |
# File 'lib/loquor/api_calls/show.rb', line 4 def initialize(klass, id) super(klass) @id = id end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/loquor/api_calls/show.rb', line 9 def execute return nil unless @id begin get_data rescue RestClient::ResourceNotFound if Loquor.config.retry_404s sleep(1) get_data else raise end end end |