Module: PathMapper::Node::Base::Representation

Included in:
PathMapper::Node::Base
Defined in:
lib/path_mapper/node/base/representation.rb

Instance Method Summary collapse

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


21
22
# File 'lib/path_mapper/node/base/representation.rb', line 21

def any?
end

#boolObject



44
45
# File 'lib/path_mapper/node/base/representation.rb', line 44

def bool
end

#dir?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/path_mapper/node/base/representation.rb', line 5

def dir?
  @path.directory?
end

#empty?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/path_mapper/node/base/representation.rb', line 13

def empty?
  true
end

#file?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/path_mapper/node/base/representation.rb', line 9

def file?
  @path.file?
end

#floatObject



40
41
42
# File 'lib/path_mapper/node/base/representation.rb', line 40

def float
  self.value.to_f
end

#inspectObject



67
68
69
# File 'lib/path_mapper/node/base/representation.rb', line 67

def inspect
  self.to_s
end

#intObject



36
37
38
# File 'lib/path_mapper/node/base/representation.rb', line 36

def int
  self.value.to_i
end

#jsonObject



51
52
53
# File 'lib/path_mapper/node/base/representation.rb', line 51

def json
  JSON.load(self.value)
end

#linesObject



47
48
49
# File 'lib/path_mapper/node/base/representation.rb', line 47

def lines
  []
end

#nil?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/path_mapper/node/base/representation.rb', line 17

def nil?
  false
end

#node?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/path_mapper/node/base/representation.rb', line 24

def node?
  true
end

#raw_valueObject



32
33
34
# File 'lib/path_mapper/node/base/representation.rb', line 32

def raw_value
  nil
end

#to_pathnameObject



63
64
65
# File 'lib/path_mapper/node/base/representation.rb', line 63

def to_pathname
  @path
end

#to_sObject



55
56
57
# File 'lib/path_mapper/node/base/representation.rb', line 55

def to_s
  @path.to_s
end

#to_strObject



59
60
61
# File 'lib/path_mapper/node/base/representation.rb', line 59

def to_str
  self.to_s
end

#valueObject



28
29
30
# File 'lib/path_mapper/node/base/representation.rb', line 28

def value
  nil
end