Sha256: 25d873e53d0e2f1771ff073692376426274fa76fc0f244591e5ec94fab143f05

Contents?: true

Size: 446 Bytes

Versions: 9

Compression:

Stored size: 446 Bytes

Contents

module Spectifly
  class Configuration
    attr_accessor :entity_path
    def initialize(config = {})
      @entity_path = config.fetch('entity_path')
      @presenter_path = config['presenter_path']
    end

    def presenter_path
      @presenter_path ||= begin
        proposed_path = File.join(@entity_path, 'presenters')
        if Dir.exists?(proposed_path)
          @presenter_path = proposed_path
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spectifly-0.0.10 lib/spectifly/configuration.rb
spectifly-0.0.9 lib/spectifly/configuration.rb
spectifly-0.0.8 lib/spectifly/configuration.rb
spectifly-0.0.7 lib/spectifly/configuration.rb
spectifly-0.0.6 lib/spectifly/configuration.rb
spectifly-0.0.5 lib/spectifly/configuration.rb
spectifly-0.0.4 lib/spectifly/configuration.rb
spectifly-0.0.3 lib/spectifly/configuration.rb
spectifly-0.0.2 lib/spectifly/configuration.rb