Class: Ext::MVC::DocsBuilder

Inherits:
Builder
  • Object
show all
Defined in:
lib/xmvc/builders/docs_builder.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instances(args = []) ⇒ Object



4
5
6
# File 'lib/xmvc/builders/docs_builder.rb', line 4

def self.instances(args = [])
  [ExtMVC::DocsBuilder.new]
end

Instance Method Details

#buildObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/xmvc/builders/docs_builder.rb', line 8

def build
  system("java -jar vendor/ext-doc/ext-doc.jar -p config/build.xml -o docs -t vendor/ext-doc/template/ext/template.xml -verbose")
  app_name = ExtMVC.settings['docs']['title'] rescue ExtMVC.environment["namespace"] || "Ext MVC"
       = ExtMVC.settings['docs']['logo']  rescue "resources/extjs.gif"

  {:app_name => app_name, :logo => }.each_pair do |key, value|
    ExtMVC.gsub_file("docs/index.html", "<%= @#{key} %>", value)
    ExtMVC.gsub_file("docs/welcome.html", "<%= @#{key} %>", value)
  end
end