Sha256: d6bf7a3854b5c059f5edb26e7adc917a3e08367279bd46ea0d3728de970a4eac

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/hash/keys'

module Quicken
  class PluginConfiguration
    attr_accessor :name, :args, :class

    def initialize name, args
      @name = name
      @args = process_args args
      require "quicken/plugins/#{name}"
      @class = "Quicken::Plugins::#{name.camelize}".constantize
    end

    private

    def process_args args
      args.respond_to?(:symbolize_keys) ? args.symbolize_keys : args
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quicken-ruby-0.1.1 lib/quicken/plugin_configuration.rb