Class: ApiSketch::Generators::Bootstrap
- Defined in:
- lib/api_sketch/generators/bootstrap.rb
Instance Attribute Summary
Attributes inherited from Base
#definitions_dir, #documentation_dir, #templates_folder
Instance Method Summary collapse
-
#filename_for(resource) ⇒ Object
This is defined here because it is related for this type of generator only.
-
#initialize(options = {}) ⇒ Bootstrap
constructor
Generated folders structure is docs - html folders and files assets - js, css and images.
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ Bootstrap
Generated folders structure is
docs - html folders and files
assets - js, css and images. Html styling
8 9 10 11 |
# File 'lib/api_sketch/generators/bootstrap.rb', line 8 def initialize( = {}) super() @resource_template = ERB.new(File.read("#{self.templates_folder}/resource.html.erb")) end |
Instance Method Details
#filename_for(resource) ⇒ Object
This is defined here because it is related for this type of generator only
14 15 16 |
# File 'lib/api_sketch/generators/bootstrap.rb', line 14 def filename_for(resource) resource.id + '.html' end |