Class: Tao::Generators::IconsGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/tao/icons/icons_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#icons_htmlObject (readonly)

Returns the value of attribute icons_html.



10
11
12
# File 'lib/generators/tao/icons/icons_generator.rb', line 10

def icons_html
  @icons_html
end

Instance Method Details

#create_icons_fileObject



12
13
14
15
# File 'lib/generators/tao/icons/icons_generator.rb', line 12

def create_icons_file
  @icons_html = svg_files.map {|file| "  #{symbol(file)}\n"}.join
  template 'icons.coffee.erb', File.join('lib/assets/javascripts/tao/ui/icons', "#{name.to_s}.coffee")
end