Class: Lotus::CliSubCommands::Destroy

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/lotus/cli_sub_commands/destroy.rb

Overview

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#actions(application_name, controller_and_action_name) ⇒ Object

Since:

  • 0.1.0



27
28
29
30
31
32
33
# File 'lib/lotus/cli_sub_commands/destroy.rb', line 27

def actions(application_name, controller_and_action_name)
  if options[:help]
    invoke :help, ['action']
  else
    Lotus::Commands::Generate::Action.new(options, application_name, controller_and_action_name).destroy.start
  end
end

#application(name) ⇒ Object

Since:

  • 0.1.0



74
75
76
77
78
79
80
81
# File 'lib/lotus/cli_sub_commands/destroy.rb', line 74

def application(name)
  if options[:help]
    invoke :help, ['app']
  else
    require 'lotus/commands/generate/app'
    Lotus::Commands::Generate::App.new(options, name).destroy.start
  end
end

#mailer(name) ⇒ Object

Since:

  • 0.1.0



90
91
92
93
94
95
96
97
98
99
# File 'lib/lotus/cli_sub_commands/destroy.rb', line 90

def mailer(name)
  if options[:help]
    invoke :help, ['mailer']
  else
    require 'lotus/commands/generate/mailer'

    options[:behavior] = :revoke
    Lotus::Commands::Generate::Mailer.new(options, name).destroy.start
  end
end

#migration(name) ⇒ Object

Since:

  • 0.1.0



42
43
44
45
46
47
48
49
# File 'lib/lotus/cli_sub_commands/destroy.rb', line 42

def migration(name)
  if options[:help]
    invoke :help, ['migration']
  else
    require 'lotus/commands/generate/migration'
    Lotus::Commands::Generate::Migration.new(options, name).destroy.start
  end
end

#model(name) ⇒ Object

Since:

  • 0.1.0



59
60
61
62
63
64
65
66
# File 'lib/lotus/cli_sub_commands/destroy.rb', line 59

def model(name)
  if options[:help]
    invoke :help, ['model']
  else
    require 'lotus/commands/generate/model'
    Lotus::Commands::Generate::Model.new(options, name).destroy.start
  end
end