Class: Loquor::ApiCall::Show

Inherits:
Loquor::ApiCall show all
Defined in:
lib/loquor/api_calls/show.rb

Instance Attribute Summary

Attributes inherited from Loquor::ApiCall

#klass

Instance Method Summary collapse

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

#executeObject



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