Sha256: 426cbbd26806ab9014ce631fbdabcfa271815a4ab9ea59d68d7d745a1a8b66f6

Contents?: true

Size: 449 Bytes

Versions: 1

Compression:

Stored size: 449 Bytes

Contents

require 'clamp/attribute_declaration'
require 'clamp/parameter'

module Clamp
  class Parameter

    module Declaration

      include AttributeDeclaration

      def parameters
        @parameters ||= []
      end

      def parameter(name, description, options = {}, &block)
        parameter = Parameter.new(name, description, options)
        parameters << parameter
        define_accessors_for(parameter, &block)
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clamp-0.0.9 lib/clamp/parameter/declaration.rb