Sha256: 1b192e5385c01a6960a40fb0d587d777c4b5676c48abf202b8b9b8ac99fe9cfe

Contents?: true

Size: 460 Bytes

Versions: 11

Compression:

Stored size: 460 Bytes

Contents

module Spectifly
  module Base
    class Configuration
      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
end

Version data entries

11 entries across 11 versions & 1 rubygems

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