Class: Sassafras::HTMLSwatch

Inherits:
Object
  • Object
show all
Defined in:
lib/sassafras.rb

Instance Method Summary collapse

Constructor Details

#initialize(theme) ⇒ HTMLSwatch

Returns a new instance of HTMLSwatch.



232
233
234
235
236
237
238
# File 'lib/sassafras.rb', line 232

def initialize(theme)
  @theme = theme
  File.open(File.dirname(__FILE__) + '/sassafras/swatch.html.erb') do |f|
    erb = ERB.new(f.read)
    erb.result(@theme.get_binding)
  end
end