Sha256: f7fde1877866bcd87ea0b03d555b08887d28d8ac5816f272f7c77196580beb72

Contents?: true

Size: 520 Bytes

Versions: 21

Compression:

Stored size: 520 Bytes

Contents

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

module Clamp
  class Parameter

    module Declaration

      include Clamp::AttributeDeclaration

      def parameters
        @parameters ||= []
      end

      def has_parameters?
        !parameters.empty?
      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

21 entries across 21 versions & 3 rubygems

Version Path
clamp-0.5.1 lib/clamp/parameter/declaration.rb
clamp-0.5.0 lib/clamp/parameter/declaration.rb
clamp-0.4.0 lib/clamp/parameter/declaration.rb
jls-clamp-0.3.1.2 lib/clamp/parameter/declaration.rb
jls-clamp-0.3.1 lib/clamp/parameter/declaration.rb
clamp-0.3.1 lib/clamp/parameter/declaration.rb
clamp-0.3.0 lib/clamp/parameter/declaration.rb
clamp-0.2.3 lib/clamp/parameter/declaration.rb
clamp-0.2.2 lib/clamp/parameter/declaration.rb
clamp-0.2.1 lib/clamp/parameter/declaration.rb
clamp-0.2.0 lib/clamp/parameter/declaration.rb
wpb-0.0.5 lib/wpb/clamp/parameter/declaration.rb
clamp-0.1.8 lib/clamp/parameter/declaration.rb
clamp-0.1.7 lib/clamp/parameter/declaration.rb
clamp-0.1.6 lib/clamp/parameter/declaration.rb
clamp-0.1.5 lib/clamp/parameter/declaration.rb
clamp-0.1.4 lib/clamp/parameter/declaration.rb
clamp-0.1.3 lib/clamp/parameter/declaration.rb
clamp-0.1.2 lib/clamp/parameter/declaration.rb
clamp-0.1.1 lib/clamp/parameter/declaration.rb