Sha256: 47f068fce45f3c156d6c5145f456d295d04af65bd85194fcfda8a7559c29a93d

Contents?: true

Size: 796 Bytes

Versions: 9

Compression:

Stored size: 796 Bytes

Contents

module RedboothRuby
  module Operations
    module Show
      module ClassMethods
        # Shows a given object
        #
        # @param [Integer] id The id of the object that should be shown
        # @return [Copy::Base] The found object
        def show(attributes={})
          response = RedboothRuby.request(:get,
                                          nil,
                                          api_member_url(attributes[:id], :show),
                                          {},
                                          options_for_request(attributes)
                                         )
          new(response.data.merge(session: attributes[:session]))
        end
      end

      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
redbooth-ruby-0.2.3 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.2.2 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.2.1 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.2.0 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.1.4 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.1.3 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.1.1 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.1.0 lib/redbooth-ruby/operations/show.rb
redbooth-ruby-0.0.5 lib/redbooth-ruby/operations/show.rb