Sha256: c051f42d35dc5a89a145044baca3f646a4148aff381fc0896178714b45f60c8c

Contents?: true

Size: 440 Bytes

Versions: 6

Compression:

Stored size: 440 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

6 entries across 6 versions & 1 rubygems

Version Path
albacore-0.2.5 lib/albacore/support/supportlinux.rb
albacore-0.2.4 lib/albacore/support/supportlinux.rb
albacore-0.2.3 lib/albacore/support/supportlinux.rb
albacore-0.2.2 lib/albacore/support/supportlinux.rb
albacore-0.2.0.preview2 lib/albacore/support/supportlinux.rb
albacore-0.2.0.preview1 lib/albacore/support/supportlinux.rb