Class: ScaffoldingCommands

Inherits:
Thor
  • Object
show all
Defined in:
lib/commands/scaffolding_commands.rb

Instance Method Summary collapse

Instance Method Details

#component(name) ⇒ Object



61
62
63
# File 'lib/commands/scaffolding_commands.rb', line 61

def component(name)
  generate_scaffolding(name, 'component', options[:path])
end

#feature(name) ⇒ Object



27
28
29
# File 'lib/commands/scaffolding_commands.rb', line 27

def feature(name)
  generate_scaffolding(name, 'feature', options[:path])
end

#helper(name) ⇒ Object



45
46
47
# File 'lib/commands/scaffolding_commands.rb', line 45

def helper(name)
  generate_scaffolding(name, 'helper', options[:path])
end

#page(name) ⇒ Object



19
20
21
# File 'lib/commands/scaffolding_commands.rb', line 19

def page(name)
  generate_scaffolding(name, 'page', options[:path], uses: options[:uses])
end

#scaffold(*names) ⇒ Object



69
70
71
# File 'lib/commands/scaffolding_commands.rb', line 69

def scaffold(*names)
  names.each { |name| generate_default_scaffold(name) }
end

#spec(name) ⇒ Object



37
38
39
# File 'lib/commands/scaffolding_commands.rb', line 37

def spec(name)
  generate_scaffolding(name, 'spec', options[:path], uses: options[:uses])
end

#steps(name) ⇒ Object



53
54
55
# File 'lib/commands/scaffolding_commands.rb', line 53

def steps(name)
  generate_scaffolding(name, 'steps', options[:path])
end