Class: Panda::EncodingScope
- Inherits:
-
Scope
show all
- Defined in:
- lib/panda/proxies/encoding_scope.rb
Instance Attribute Summary
Attributes inherited from Proxy
#klass, #parent
Instance Method Summary
collapse
Methods inherited from Scope
#all, #create, #create!, #find_by_path, #reload, #respond_to?
Methods inherited from Proxy
#cloud, #sti_name
#connection
#find, #find_by_path, #find_object_by_path
#all, #find_by
#create, #create!
#build_hash_many_path, #create_rest_url, #many_path, #match, #one_path, #resource_path
Constructor Details
Returns a new instance of EncodingScope.
4
5
6
|
# File 'lib/panda/proxies/encoding_scope.rb', line 4
def initialize(parent)
super(parent, Encoding)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Panda::Finders::FindMany
Instance Method Details
#[](index) ⇒ Object
47
48
49
50
51
52
53
|
# File 'lib/panda/proxies/encoding_scope.rb', line 47
def [](index)
if(index.is_a? String)
proxy_found.select{|e| e.profile_name == index}[0]
else
proxy_found[index]
end
end
|
#find_by_profile_name(this_profile_name) ⇒ Object
42
43
44
45
|
# File 'lib/panda/proxies/encoding_scope.rb', line 42
def find_by_profile_name(this_profile_name)
@scoped_attributes[:profile_name] = this_profile_name
trigger_request.first
end
|
#non_delegate_methods ⇒ Object
8
9
10
|
# File 'lib/panda/proxies/encoding_scope.rb', line 8
def non_delegate_methods
super + [:status, :profile_id, :profile_name, :video, :page, :per_page, :[]]
end
|
#page(this_page) ⇒ Object
12
13
14
15
|
# File 'lib/panda/proxies/encoding_scope.rb', line 12
def page(this_page)
@scoped_attributes[:page] = this_page
self
end
|
#per_page(this_per_page) ⇒ Object
17
18
19
20
|
# File 'lib/panda/proxies/encoding_scope.rb', line 17
def per_page(this_per_page)
@scoped_attributes[:per_page] = this_per_page
self
end
|
#profile(this_profile_id) ⇒ Object
32
33
34
35
|
# File 'lib/panda/proxies/encoding_scope.rb', line 32
def profile(this_profile_id)
@scoped_attributes[:profile_id] = this_profile_id
self
end
|
#profile_name(this_profile_name) ⇒ Object
37
38
39
40
|
# File 'lib/panda/proxies/encoding_scope.rb', line 37
def profile_name(this_profile_name)
@scoped_attributes[:profile_name] = this_profile_name
self
end
|
#status(this_status) ⇒ Object
27
28
29
30
|
# File 'lib/panda/proxies/encoding_scope.rb', line 27
def status(this_status)
@scoped_attributes[:status] = this_status
self
end
|
#video(this_video_id) ⇒ Object
22
23
24
25
|
# File 'lib/panda/proxies/encoding_scope.rb', line 22
def video(this_video_id)
@scoped_attributes[:video_id] = this_video_id
self
end
|