Method: Fleximage::Operator::Base#symbol_to_gravity

Defined in:
lib/fleximage/operator/base.rb

#symbol_to_gravity(gravity_name) ⇒ Object



162
163
164
165
166
167
168
169
170
# File 'lib/fleximage/operator/base.rb', line 162

def symbol_to_gravity(gravity_name)
  gravity = GRAVITIES[gravity_name]
  
  if gravity
    gravity
  else
    raise ArgumentError, ":#{gravity_name} is not a valid gravity name.\n\nValid names are :center, :top, :top_right, :right, :bottom_right, :bottom, :bottom_left, :left, :top_left"
  end
end