Sha256: e13b0f8bf853d08735deebce44a9276400d57cf634fa154a65ed707661b817ae

Contents?: true

Size: 331 Bytes

Versions: 12

Compression:

Stored size: 331 Bytes

Contents

module Loquor
  class ApiCall::Show < ApiCall

    def initialize(klass, id)
      super(klass)
      @id = id
    end

    def execute
      obj = if (klass.cache)
        Loquor.get("#{klass.path}/#{@id}", cache=klass.cache)
      else
        Loquor.get("#{klass.path}/#{@id}")
      end
      @klass.new(obj)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
loquor-1.4.0 lib/loquor/api_calls/show.rb
loquor-1.3.0 lib/loquor/api_calls/show.rb
loquor-1.2.1 lib/loquor/api_calls/show.rb
loquor-1.2.0 lib/loquor/api_calls/show.rb
loquor-1.1.1 lib/loquor/api_calls/show.rb
loquor-1.1.0 lib/loquor/api_calls/show.rb
loquor-1.0.0 lib/loquor/api_calls/show.rb
loquor-0.9.0 lib/loquor/api_calls/show.rb
loquor-0.8.0 lib/loquor/api_calls/show.rb
loquor-0.7.0 lib/loquor/api_calls/show.rb
loquor-0.6.0 lib/loquor/api_calls/show.rb
loquor-0.5.4 lib/loquor/api_calls/show.rb