Sha256: 2a3fdd0b0cdd364aaa1b384d110e5bab900f04f359f0424bba212944e0b202ce

Contents?: true

Size: 424 Bytes

Versions: 12

Compression:

Stored size: 424 Bytes

Contents

# frozen_string_literal: true

require_relative 'parameter'

module IIFinder
  module Parameters
    extend ActiveSupport::Concern

    included do
      class_attribute :_parameters
      self._parameters = []
    end

    class_methods do
      def parameters(*names, **options)
        names.each do |name|
          self._parameters = _parameters + [Parameter.new(name, options)]
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ii_finder-2.3.0 lib/ii_finder/parameters.rb
ii_finder-2.2.2 lib/ii_finder/parameters.rb
ii_finder-2.2.1 lib/ii_finder/parameters.rb
ii_finder-2.2.0 lib/ii_finder/parameters.rb
ii_finder-2.1.0 lib/ii_finder/parameters.rb
ii_finder-2.0.1 lib/ii_finder/parameters.rb
ii_finder-2.0.0 lib/ii_finder/parameters.rb
ii_finder-1.2.0 lib/ii_finder/parameters.rb
ii_finder-1.1.2 lib/ii_finder/parameters.rb
ii_finder-1.1.1 lib/ii_finder/parameters.rb
ii_finder-1.1.0 lib/ii_finder/parameters.rb
ii_finder-1.0.0 lib/ii_finder/parameters.rb