Sha256: 671710c99788fbdf828a53049692ccc540bfaf256c174408ff7b29544277340c

Contents?: true

Size: 383 Bytes

Versions: 11

Compression:

Stored size: 383 Bytes

Contents

class Pathname
  def initialize path
    raise ArgumentError if path == "\0"
    @path = path
  end

  attr_reader :path

  def == other
    other.path == @path
  end

  def absolute?
    @path.start_with? '/'
  end

  def relative?
    !absolute?
  end

  def to_path
    @path
  end
  alias :to_str :to_path
  alias :to_s :to_path
end

module Kernel
  def Pathname(path)
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
opal-0.6.3 stdlib/pathname.rb
opal-cj-0.7.0.beta2 stdlib/pathname.rb
opal-cj-0.7.0.beta1 stdlib/pathname.rb
opal-0.7.0.beta1 stdlib/pathname.rb
opal-0.6.2 stdlib/pathname.rb
opal-0.6.1 stdlib/pathname.rb
opal-0.6.0 stdlib/pathname.rb
opal-0.5.5 stdlib/pathname.rb
opal-0.5.4 stdlib/pathname.rb
opal-0.5.2 stdlib/pathname.rb
opal-0.5.0 stdlib/pathname.rb