Class: Cameraplus::Search
- Inherits:
-
Object
- Object
- Cameraplus::Search
- Defined in:
- lib/cameraplus/search.rb
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#photos ⇒ Object
readonly
Returns the value of attribute photos.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(result) ⇒ Search
constructor
A new instance of Search.
Constructor Details
#initialize(result) ⇒ Search
Returns a new instance of Search.
11 12 13 14 |
# File 'lib/cameraplus/search.rb', line 11 def initialize(result) @result ||= result parse end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
4 5 6 |
# File 'lib/cameraplus/search.rb', line 4 def page @page end |
#photos ⇒ Object (readonly)
Returns the value of attribute photos.
4 5 6 |
# File 'lib/cameraplus/search.rb', line 4 def photos @photos end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/cameraplus/search.rb', line 4 def user @user end |
Class Method Details
.find(filters) ⇒ Object
6 7 8 9 |
# File 'lib/cameraplus/search.rb', line 6 def self.find(filters) results = Cameraplus::API::Search.find filters results.map { |result| new result } end |