Class: ScDocs::ScGenerator

Inherits:
Generator show all
Defined in:
lib/sc_docs/generator.rb

Instance Attribute Summary collapse

Attributes inherited from Generator

#input_dirs, #output_dir, #smartdown, #template, #verbose

Instance Method Summary collapse

Methods inherited from Generator

#command, #preview

Constructor Details

#initialize(directories, options = {}) ⇒ ScGenerator

Returns a new instance of ScGenerator.



101
102
103
104
105
106
107
# File 'lib/sc_docs/generator.rb', line 101

def initialize(directories, options={})
  super
  @template = File.expand_path("../templates/sc_fixture", __FILE__)
  @app_dir    = File.expand_path(options[:output_dir])
  @output_dir = File.join(@app_dir, "apps", "docs", "fixtures")
  @project_name = options[:project_name] || "docs_viewer"
end

Instance Attribute Details

#app_dirObject (readonly)

Returns the value of attribute app_dir.



97
98
99
# File 'lib/sc_docs/generator.rb', line 97

def app_dir
  @app_dir
end

#project_nameObject (readonly)

Returns the value of attribute project_name.



99
100
101
# File 'lib/sc_docs/generator.rb', line 99

def project_name
  @project_name
end

Instance Method Details

#generateObject



109
110
111
112
113
# File 'lib/sc_docs/generator.rb', line 109

def generate
  prep
  run_command
  deploy
end