Module: Compass::SassExtensions::Functions::Sprites::VariableReader

Defined in:
lib/compass/sass_extensions/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



15
16
17
# File 'lib/compass/sass_extensions/functions/sprites.rb', line 15

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