Sha256: 6021ea547fcf4aef244272a9f54d943de6022aaae6315877c3cff5aed9bd7b99

Contents?: true

Size: 532 Bytes

Versions: 20

Compression:

Stored size: 532 Bytes

Contents

require 'distil/configurable/project-path'

module Distil
  
  class OutputPath < Interpolated
    
    def self.value_of(value, owner)
      return value if !owner
      
      value= super(value, owner)

      return value if 0==value.index(File::SEPARATOR)
      return value if !owner.is_a?(Configurable)
      
      path= owner.get_option("output_folder")
      return value if !path || path.empty?
      
      return value if value!=path && 0==value.index(path)
      
      File.join(path, value)
    end
    
  end
  
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
distil-0.13.6 lib/distil/configurable/output-path.rb
distil-0.13.5 lib/distil/configurable/output-path.rb
distil-0.13.4 lib/distil/configurable/output-path.rb
distil-0.13.3 lib/distil/configurable/output-path.rb
distil-0.13.2 lib/distil/configurable/output-path.rb
distil-0.13.1 lib/distil/configurable/output-path.rb
distil-0.13.0 lib/distil/configurable/output-path.rb
distil-0.12.6 lib/distil/configurable/output-path.rb
distil-0.12.4 lib/distil/configurable/output-path.rb
distil-0.12.3 lib/distil/configurable/output-path.rb
distil-0.12.2 lib/distil/configurable/output-path.rb
distil-0.12.1 lib/distil/configurable/output-path.rb
distil-0.12.0 lib/distil/configurable/output-path.rb
distil-0.11.8 lib/distil/configurable/output-path.rb
distil-0.11.6 lib/distil/configurable/output-path.rb
distil-0.11.5 lib/distil/configurable/output-path.rb
distil-0.11.4 lib/distil/configurable/output-path.rb
distil-0.11.3 lib/distil/configurable/output-path.rb
distil-0.11.1 lib/distil/configurable/output-path.rb
distil-0.11.0 lib/distil/configurable/output-path.rb