Method: Confetti::Config#orientation

Defined in:
lib/confetti/config.rb

#orientationObject

simple helper for grabbing chosen orientation, or the default returns one of :portrait, :landscape, or :default



188
189
190
191
192
193
194
195
196
197
# File 'lib/confetti/config.rb', line 188

def orientation
  values = [:portrait, :landscape, :default]
  choice = preference :orientation

  unless choice and values.include?(choice)
    :default
  else
    choice
  end
end