Module: FlickrMocks::Models::Helpers
- Defined in:
- lib/flickr_mocks/models/helpers.rb
Overview
module contains methods that are used internally by the various class wrappers for the FlickRaw::Response and FlickRaw::ResponseList objects.
Class Method Summary collapse
-
.array_accessor_methods ⇒ Object
returns list of array methods.
-
.paging_defaults ⇒ Object
returns the default values for paging Flickr objects.
-
.possible_sizes ⇒ Object
returns list of sizes that a Flickr photo can have.
Class Method Details
.array_accessor_methods ⇒ Object
returns list of array methods. These methods are often used for mimicking array like behavior to classes.
9 10 11 12 13 |
# File 'lib/flickr_mocks/models/helpers.rb', line 9 def self.array_accessor_methods [:[], :first, :last,:empty?,:length,:size,:each,:each_index, :each_with_index,:map, :select, :keep_if,:at,:fetch, :reverse_each, :find_index, :index,:rindex, :collect,:values_at] end |
.paging_defaults ⇒ Object
returns the default values for paging Flickr objects
17 18 19 20 21 22 23 |
# File 'lib/flickr_mocks/models/helpers.rb', line 17 def self.paging_defaults { :max_entries => ::FlickrMocks::Api.default(:max_entries).to_i, :per_page => ::FlickrMocks::Api.default(:per_page).to_i, :current_page => ::FlickrMocks::Api.default(:page).to_i } end |
.possible_sizes ⇒ Object
returns list of sizes that a Flickr photo can have
26 27 28 |
# File 'lib/flickr_mocks/models/helpers.rb', line 26 def self.possible_sizes ::FlickrMocks::Api.default(:possible_sizes) end |