module PathMapper::Node::Base

Attributes

name[R]
path[R]

Public Class Methods

new(path, **kwargs) click to toggle source
# File lib/path_mapper/node/base.rb, line 12
def initialize(path, **kwargs)
  @path = Pathname.new(path)
  @name = @path.basename.to_s
end

Public Instance Methods

parent() click to toggle source
# File lib/path_mapper/node/base.rb, line 17
def parent
  self._create_node(@path.parent)
end

Protected Instance Methods

_create_node(path) click to toggle source
# File lib/path_mapper/node/base.rb, line 23
def _create_node(path)
  PathMapper.new(path, self._general_options)
end
_general_options() click to toggle source
# File lib/path_mapper/node/base.rb, line 27
def _general_options
  {}
end