Sha256: d4ddfa9730321d5b2240883144f1f9960c4cc59493a93dc069dfbdb5d5b349c4

Contents?: true

Size: 459 Bytes

Versions: 3

Compression:

Stored size: 459 Bytes

Contents

require_relative 'definition'

module Kafo
  module AppOption
    module Declaration

      include Clamp::Option::Declaration

      def app_option(switches, type, description, opts = {}, &block)
        AppOption::Definition.new(switches, type, description, opts).tap do |option|
          block ||= option.default_conversion_block
          define_accessors_for(option, &block)
          declared_options << option
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kafo-6.1.1 lib/kafo/app_option/declaration.rb
kafo-6.1.0 lib/kafo/app_option/declaration.rb
kafo-6.0.0 lib/kafo/app_option/declaration.rb