Class: Pure::Sass::Translation
- Inherits:
-
Object
- Object
- Pure::Sass::Translation
- Defined in:
- lib/pure/sass/translation.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(path) ⇒ Translation
constructor
A new instance of Translation.
- #render(destination) ⇒ Object
Constructor Details
#initialize(path) ⇒ Translation
Returns a new instance of Translation.
9 10 11 |
# File 'lib/pure/sass/translation.rb', line 9 def initialize(path) self.path = path end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
7 8 9 |
# File 'lib/pure/sass/translation.rb', line 7 def path @path end |
Instance Method Details
#context ⇒ Object
18 19 20 |
# File 'lib/pure/sass/translation.rb', line 18 def context DefaultTranslation.new end |
#render(destination) ⇒ Object
13 14 15 16 |
# File 'lib/pure/sass/translation.rb', line 13 def render(destination) scss_output = FS.evaluate(File.read(path), context) File.write destination, scss_output.gsub(/#{context.prefix}#{context.skinName} ?/, "") end |