module PathMapper::Node::File::Representation

Public Instance Methods

bool() click to toggle source
# File lib/path_mapper/node/file/representation.rb, line 23
def bool
  value == 'yes'
end
empty?() click to toggle source
# File lib/path_mapper/node/file/representation.rb, line 5
def empty?
  false
end
lines() click to toggle source
# File lib/path_mapper/node/file/representation.rb, line 27
def lines
  self.value.lines.map {|l| l.strip }
end
raw_value() click to toggle source
# File lib/path_mapper/node/file/representation.rb, line 13
def raw_value
  with_dry_run do |dry_run|
    if dry_run
      self.storage[@path].to_s
    else
      ::File.read(@path)
    end
  end
end
to_s() click to toggle source
# File lib/path_mapper/node/file/representation.rb, line 31
def to_s
  self.value
end
value() click to toggle source
# File lib/path_mapper/node/file/representation.rb, line 9
def value
  self.raw_value.strip
end