class Docker::Path

Attributes

name[R]
path[R]

Public Class Methods

new(path) click to toggle source
# File lib/docker/path.rb, line 5
def initialize(path)
  raise "Bad Path: Directory Not Found" unless Dir.exist?(path)
  @path = File.expand_path(path)
  @name = @path.sub(/\/$/, '').sub(/.+\//, '')
end

Public Instance Methods

to_dpath() click to toggle source
# File lib/docker/path.rb, line 15
def to_dpath
  self
end
to_s() click to toggle source
# File lib/docker/path.rb, line 11
def to_s
  @path
end