Class: Mynatra::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/mynatra/cli.rb

Instance Method Summary collapse

Instance Method Details

#new(name) ⇒ Object



10
11
12
# File 'lib/mynatra/cli.rb', line 10

def new(name)
  Mynatra::Generators::Scaffolding.start([name.singularize])
end

#resource(name, *attributes) ⇒ Object



15
16
17
18
19
# File 'lib/mynatra/cli.rb', line 15

def resource(name, *attributes)
  puts "The arguments are: #{attributes}"
  puts "Args is: #{attributes.class}"
  Mynatra::Generators::Resource.start([ name.singularize, attributes ])
end