Class: Querly::Script

Inherits:
Object
  • Object
show all
Defined in:
lib/querly/script.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, node:) ⇒ Script

Returns a new instance of Script.



6
7
8
9
# File 'lib/querly/script.rb', line 6

def initialize(path:, node:)
  @path = path
  @node = node
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



4
5
6
# File 'lib/querly/script.rb', line 4

def node
  @node
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/querly/script.rb', line 3

def path
  @path
end

Instance Method Details

#root_pairObject



11
12
13
# File 'lib/querly/script.rb', line 11

def root_pair
  NodePair.new(node: node)
end