Module: ResponsiveImages::Config

Included in:
ResponsiveImages
Defined in:
lib/responsive_images/config.rb

Constant Summary collapse

VALID_OPTION_KEYS =
[
  :default,
  :sizes
]

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



11
12
13
14
# File 'lib/responsive_images/config.rb', line 11

def configure
  yield self
  self
end

#optionsObject



16
17
18
19
20
# File 'lib/responsive_images/config.rb', line 16

def options
  options = {}
  VALID_OPTION_KEYS.each{ |pname| options[pname] = send(pname) }
  options
end

#responsive_sizesObject



23
24
25
# File 'lib/responsive_images/config.rb', line 23

def responsive_sizes
  sizes
end