Sha256: 3c4da18ac37ef8435311d1a5790e007c7a3dfed8eb8390fd62dadb865bb76ae7

Contents?: true

Size: 492 Bytes

Versions: 1

Compression:

Stored size: 492 Bytes

Contents

module Relish
  module Command
    module Dsl
      class Command < Base
        
        def define(name, &block)
          context_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)
        end
        
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
relish-0.0.9 lib/relish/commands/dsl/command.rb