Class: ApiDef::CLI
- Inherits:
-
Thor
- Object
- Thor
- ApiDef::CLI
- Defined in:
- lib/api_def/cli.rb
Instance Method Summary collapse
Instance Method Details
#build(file) ⇒ Object
13 14 15 16 17 |
# File 'lib/api_def/cli.rb', line 13 def build(file) spec = load_spec file tpl = ApiDef::Template.find([:template]).new STDOUT.write tpl.render(spec) end |
#mock(file) ⇒ Object
20 21 22 23 24 |
# File 'lib/api_def/cli.rb', line 20 def mock(file) spec = load_spec file app = ApiDef::Mock.create_application spec app.run! end |