Module: Sass::Script::Functions

Defined in:
lib/generators/i0n/layout/templates/lib/sass_extensions.rb

Instance Method Summary collapse

Instance Method Details

#integer(number) ⇒ Object

Converts a number into an integer (Useful for converting percentages etc)



5
6
7
8
# File 'lib/generators/i0n/layout/templates/lib/sass_extensions.rb', line 5

def integer(number)
  assert_type number, :Number
  Sass::Script::Number.new(number.to_i)
end