Module: Sass::Script::Functions::VariableReader

Defined in:
lib/simple-compass/sass/functions/sprites.rb

Overview

Provides a consistent interface for getting a variable in ruby from a keyword argument hash that accounts for underscores/dash equivalence and allows the caller to pass a symbol instead of a string.

Instance Method Summary collapse

Instance Method Details

#get_var(variable_name) ⇒ Object



8
9
10
# File 'lib/simple-compass/sass/functions/sprites.rb', line 8

def get_var(variable_name)
  self[variable_name.to_s.gsub(/-/,"_")]
end