Class: UState::Query::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/ustate/query/node.rb

Instance Method Summary collapse

Instance Method Details

#indent(s, d = 1) ⇒ Object



5
6
7
# File 'lib/ustate/query/node.rb', line 5

def indent(s, d = 1)
  ("  " * d) + s.gsub("\n", "\n" + ("  " * d))
end

#inspectObject



13
14
15
# File 'lib/ustate/query/node.rb', line 13

def inspect
  inspect_helper
end

#inspect_helper(*kids) ⇒ Object



9
10
11
# File 'lib/ustate/query/node.rb', line 9

def inspect_helper(*kids)
  "#{self.class}\n#{indent kids.map { |k| k.inspect }.join("\n")}"
end

#massObject



17
18
19
# File 'lib/ustate/query/node.rb', line 17

def mass
  1
end