Sha256: 2b8d0b5932fc619dec9f7b3e99a9501f90a58ec033c679780a4062d64af46da1

Contents?: true

Size: 417 Bytes

Versions: 9

Compression:

Stored size: 417 Bytes

Contents

module SupportsLinuxEnvironment
  attr_accessor :is_linux
  
  def initialize
    @is_linux = RUBY_PLATFORM.include? 'linux'
    super()
  end
  
  def format_reference(reference)
    "\"/reference:#{to_OS_format(reference)}\""
  end

  def format_path(path)
    "\"#{to_OS_format(path)}\""
  end

  def to_OS_format(input)
    formatted_input = @is_linux ? input : input.gsub("/", "\\")
    formatted_input
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
albacore-0.3.6 lib/albacore/support/supportlinux.rb
albacore-1.0.0.rc.2 lib/albacore/support/supportlinux.rb
albacore-1.0.0.rc.1 lib/albacore/support/supportlinux.rb
albacore-0.3.5 lib/albacore/support/supportlinux.rb
albacore-0.3.4 lib/albacore/support/supportlinux.rb
albacore-0.3.3 lib/albacore/support/supportlinux.rb
albacore-0.3.2 lib/albacore/support/supportlinux.rb
albacore-0.3.1 lib/albacore/support/supportlinux.rb
albacore-0.3.0 lib/albacore/support/supportlinux.rb