Class: CocoGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/coco/coco_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_component_fileObject



6
7
8
# File 'lib/generators/coco/coco_generator.rb', line 6

def create_component_file
  template "component.rb", component_file_path
end

#create_css_fileObject



14
15
16
# File 'lib/generators/coco/coco_generator.rb', line 14

def create_css_file
  template "component.css", css_file_path
end

#create_js_fileObject



18
19
20
# File 'lib/generators/coco/coco_generator.rb', line 18

def create_js_file
  template "component.js", js_file_path
end

#create_preview_fileObject



22
23
24
# File 'lib/generators/coco/coco_generator.rb', line 22

def create_preview_file
  template "preview.rb", preview_file_path
end

#create_template_fileObject



10
11
12
# File 'lib/generators/coco/coco_generator.rb', line 10

def create_template_file
  template "component.html.erb", template_file_path
end

#create_test_fileObject



26
27
28
# File 'lib/generators/coco/coco_generator.rb', line 26

def create_test_file
  template "test.rb", test_file_path
end