Sha256: 48b919bc8a810ce92b006ae4cab78d680d3c5fc3701af289417c89fc545694c2

Contents?: true

Size: 341 Bytes

Versions: 3

Compression:

Stored size: 341 Bytes

Contents

# frozen_string_literal: true

module Eye::Patch

  class OptionSet < Hash

    def initialize(option_class, options)
      Array(options).each do |option|
        option_data = option_class.name_and_class(option[:name].to_sym)
        self[option_data[:name]] = option[:config].merge(type: option_data[:type])
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eye-patch-1.1.0 lib/eye/patch/option_set.rb
eye-patch-1.0.1 lib/eye/patch/option_set.rb
eye-patch-1.0.0 lib/eye/patch/option_set.rb