Class: Rejson::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/rejson/path.rb

Overview

Represents a Path in JSON value

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Path

Returns a new instance of Path.



13
14
15
# File 'lib/rejson/path.rb', line 13

def initialize(path)
  @str_path = path
end

Instance Attribute Details

#str_pathObject

Returns the value of attribute str_path.



6
7
8
# File 'lib/rejson/path.rb', line 6

def str_path
  @str_path
end

Class Method Details

.root_pathObject



8
9
10
11
# File 'lib/rejson/path.rb', line 8

def self.root_path
  root = Path.new(".")
  root
end