Class: Amy::Parser
- Inherits:
-
Object
- Object
- Amy::Parser
- Defined in:
- lib/amy/parser.rb
Constant Summary collapse
- OPTIONS_FILE =
".amy"
Instance Method Summary collapse
- #execute(dir) ⇒ Object
-
#initialize(base_dir = "doc/") ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(base_dir = "doc/") ⇒ Parser
Returns a new instance of Parser.
10 11 12 13 14 |
# File 'lib/amy/parser.rb', line 10 def initialize(base_dir = "doc/") @generator = Amy::Generator.new base_dir = @mode = ['mode'] || 'file' end |
Instance Method Details
#execute(dir) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/amy/parser.rb', line 18 def execute(dir) specs = load_specs dir if (@mode == "code") specs['links'] = ['links'] specs['base_url'] = ['base_url'] specs['api_version'] = ['api_version'] end compile_json_specs_with dir, specs generate_main_page_with specs copy_styles_and_js true end |