Sha256: 120ff92175df31544b2798f183069728924fbbab63628608c1a45b12b6f59bd5

Contents?: true

Size: 999 Bytes

Versions: 12

Compression:

Stored size: 999 Bytes

Contents

module Panda
  class EncodingScope < Scope

    def initialize(parent)
      super(parent, Encoding)
    end

    def non_delegate_methods
      super + [:status, :profile_id, :profile_name, :video, :page, :per_page]
    end

    def page(this_page)
      @scoped_attributes[:page] = this_page
      self
    end

    def per_page(this_per_page)
      @scoped_attributes[:per_page] = this_per_page
      self
    end

    def video(this_video_id)
      @scoped_attributes[:video_id] = this_video_id
      self
    end

    def status(this_status)
      @scoped_attributes[:status] = this_status
      self
    end

    def profile(this_profile_id)
      @scoped_attributes[:profile_id] = this_profile_id
      self
    end

    def profile_name(this_profile_name)
      @scoped_attributes[:profile_name] = this_profile_name 
      self
    end

    def find_by_profile_name(this_profile_name)
      @scoped_attributes[:profile_name] = this_profile_name
      trigger_request.first
    end

  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
panda-1.4.4 lib/panda/proxies/encoding_scope.rb
panda-1.4.3 lib/panda/proxies/encoding_scope.rb
panda-1.4.2 lib/panda/proxies/encoding_scope.rb
panda-1.4.1 lib/panda/proxies/encoding_scope.rb
panda-1.4.0 lib/panda/proxies/encoding_scope.rb
panda-1.3.0 lib/panda/proxies/encoding_scope.rb
panda-1.2.2 lib/panda/proxies/encoding_scope.rb
panda-1.2.1 lib/panda/proxies/encoding_scope.rb
panda-1.2.0 lib/panda/proxies/encoding_scope.rb
panda-1.1.0 lib/panda/proxies/encoding_scope.rb
faraday-panda-1.1.0 lib/panda/proxies/encoding_scope.rb
panda-1.0.0 lib/panda/proxies/encoding_scope.rb