Class: FatSecret::ResultsProxy

Inherits:
BasicObject
Defined in:
lib/fat_secret/results_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, max_results, page_number, total_results) ⇒ ResultsProxy

Returns a new instance of ResultsProxy.



6
7
8
9
10
11
# File 'lib/fat_secret/results_proxy.rb', line 6

def initialize(target, max_results, page_number, total_results )
  @max_results = max_results.try(:to_i)
  @page_number = page_number.try(:to_i)
  @total_results = total_results.try(:to_i)
  @target = target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (protected)



19
20
21
# File 'lib/fat_secret/results_proxy.rb', line 19

def method_missing(name, *args, &block)
  target.send(name, *args, &block)
end

Instance Attribute Details

#max_resultsObject (readonly)

Returns the value of attribute max_results.



4
5
6
# File 'lib/fat_secret/results_proxy.rb', line 4

def max_results
  @max_results
end

#page_numberObject (readonly)

Returns the value of attribute page_number.



4
5
6
# File 'lib/fat_secret/results_proxy.rb', line 4

def page_number
  @page_number
end

#total_resultsObject (readonly)

Returns the value of attribute total_results.



4
5
6
# File 'lib/fat_secret/results_proxy.rb', line 4

def total_results
  @total_results
end

Instance Method Details

#load_associationsObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/fat_secret/results_proxy.rb', line 13

def load_associations
  raise NotImplementedError
end