Sha256: e71fada0506b66638a384b58f262577f86aa475e347b321092a9ba30de77a2f1

Contents?: true

Size: 669 Bytes

Versions: 73

Compression:

Stored size: 669 Bytes

Contents

module Coco
  module Concerns
    module AcceptsOptions
      extend ActiveSupport::Concern

      delegate :get_option_value,
        :set_option_value,
        :option_value_equals?,
        :get_option,
        :merge_option_values,
        :option_names,
        to: :accepted_options

      def get_option_group(...)
        accepted_options.get_group(...)
      end

      def accepted_options
        @_accepted_options ||= self.class.option_group.clone
      end

      class_methods do
        delegate :accepts_option, to: :option_group

        def option_group
          @_options ||= Coco::Options::Group.new(:root)
        end
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
coveragebook_components-0.8.4 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.8.3 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.8.2 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.8.1 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.8.0 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.8.0.beta.3 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.8.0.beta.2 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.8.0.beta.1 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.10 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.9 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.8 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.7 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.6 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.5 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.4 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.3 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.2 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.1 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.7.0 app/components/coco/concerns/accepts_options.rb
coveragebook_components-0.6.5 app/components/coco/concerns/accepts_options.rb