Module: SmoothOperator::FinderMethods
- Included in:
- Base
- Defined in:
- lib/smooth_operator/finder_methods.rb
Instance Method Summary collapse
Instance Method Details
#all(data = {}, options = {}) ⇒ Object
7 8 9 |
# File 'lib/smooth_operator/finder_methods.rb', line 7 def all(data = {}, = {}) find(:all, data, ) end |
#find(relative_path, data = {}, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/smooth_operator/finder_methods.rb', line 11 def find(relative_path, data = {}, = {}) relative_path = '' if relative_path == :all get(relative_path, data, ) do |remote_call| remote_call.object = build_object(remote_call.parsed_response, ) if remote_call.ok? block_given? ? yield(remote_call) : remote_call end end |