Sha256: b282abb9f3476aee05e15012c3035fc520085aadd63c3b77898c1e9e23e421c4

Contents?: true

Size: 526 Bytes

Versions: 21

Compression:

Stored size: 526 Bytes

Contents

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
relish-0.7.1 lib/relish/commands/dsl/command.rb
relish-0.7 lib/relish/commands/dsl/command.rb
relish-0.6 lib/relish/commands/dsl/command.rb
relish-0.5.3 lib/relish/commands/dsl/command.rb
relish-0.5.2 lib/relish/commands/dsl/command.rb
relish-0.5.1 lib/relish/commands/dsl/command.rb
relish-0.5.0 lib/relish/commands/dsl/command.rb
relish-0.4.0 lib/relish/commands/dsl/command.rb
relish-0.3.0 lib/relish/commands/dsl/command.rb
relish-0.3.0.pre lib/relish/commands/dsl/command.rb
relish-0.2.3 lib/relish/commands/dsl/command.rb
relish-0.2.2 lib/relish/commands/dsl/command.rb
relish-0.2.1 lib/relish/commands/dsl/command.rb
relish-0.2.0 lib/relish/commands/dsl/command.rb
relish-0.1.6 lib/relish/commands/dsl/command.rb
relish-0.1.5 lib/relish/commands/dsl/command.rb
relish-0.1.4 lib/relish/commands/dsl/command.rb
relish-0.1.3 lib/relish/commands/dsl/command.rb
relish-0.1.2 lib/relish/commands/dsl/command.rb
relish-0.1.1 lib/relish/commands/dsl/command.rb