lib/relish/commands/dsl/command.rb in relish-0.0.9 vs lib/relish/commands/dsl/command.rb in relish-0.1.0
- old
+ new
@@ -1,21 +1,22 @@
module Relish
module Command
module Dsl
- class Command < Base
+ class Command
+ include ContextClass
def define(name, &block)
- context_eval do
+ context_class_eval do
define_method(name) do
begin
instance_exec(&block)
rescue RestClient::Exception => exception
warn exception.response
exit 1
end
end
end
- HelpText.add(name, context_name)
+ HelpText.add(name, context_class_name)
end
end
end
end
\ No newline at end of file