Class: Legion::Cli::Lex::Exchange
- Inherits:
-
Thor
- Object
- Thor
- Legion::Cli::Lex::Exchange
- Includes:
- Thor::Actions
- Defined in:
- lib/legion/cli/lex/exchange.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/legion/cli/lex/exchange.rb', line 7 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#create(name) ⇒ Object
18 19 20 21 |
# File 'lib/legion/cli/lex/exchange.rb', line 18 def create(name) template('templates/queue.erb', "lib/legion/extensions/#{lex}/transport/exchanges/#{name}.rb", { name: name, lex: lex }) template('templates/queue_spec.erb', "spec/exchanges/#{name}_spec.rb", { name: name, lex: lex }) end |
#delete(name) ⇒ Object
24 25 26 27 28 |
# File 'lib/legion/cli/lex/exchange.rb', line 24 def delete(name) remove_file("lib/legion/extensions/#{lex}/transport/exchanges/#{name}.rb") remove_file("spec/exchanges/#{name}_spec.rb") remove_file("spec/transport/exchanges/#{name}_spec.rb") end |