Module: F00px::ParametersBuilder

Included in:
Api::Photos::Builder
Defined in:
lib/f00px/api/parameters_builder.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



24
25
26
# File 'lib/f00px/api/parameters_builder.rb', line 24

def build
  @params
end

#images(*images) ⇒ Object



8
9
10
11
# File 'lib/f00px/api/parameters_builder.rb', line 8

def images(*images)
  @params[:image_size] = Array(images)
  self
end

#include_states(v) ⇒ Object



13
14
15
16
# File 'lib/f00px/api/parameters_builder.rb', line 13

def include_states(v)
  @params[:include_states] = !!v
  self
end

#initializeObject



4
5
6
# File 'lib/f00px/api/parameters_builder.rb', line 4

def initialize
  @params = {}
end

#options(opts) ⇒ Object



18
19
20
21
22
# File 'lib/f00px/api/parameters_builder.rb', line 18

def options(opts)
  images(*opts[:images]) if opts[:images]
  @params.merge!(opts)
  self
end