Sha256: 61ca140c3ec7d1092c997f3ec1edc350ccdd4dcc42638781f8f9ea044add78be

Contents?: true

Size: 429 Bytes

Versions: 3

Compression:

Stored size: 429 Bytes

Contents

module Meta2
  class Resolver
    attr_reader :strategy, :context, :options

    def setup(strategy, context, options)
      @strategy, @context, @options = strategy, context, options
    end

    def detect
      Meta2.debug "strategy: #{strategy}"
      strategy_class_name = "Meta2::Strategies::#{@strategy.to_s.camelize}"

      strategy = strategy_class_name.constantize.new @options
      strategy.detect
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
meta2-0.0.3 lib/meta2/resolver.rb
meta2-0.0.2 lib/meta2/resolver.rb
meta2-0.0.1 lib/meta2/resolver.rb