Class: Grumlin::Path

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Path

Returns a new instance of Path.



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

def initialize(path)
  @labels = Grumlin::Typing.cast(path[:labels])
  @objects = Grumlin::Typing.cast(path[:objects])
end

Instance Attribute Details

#objectsObject (readonly)

Returns the value of attribute objects.



4
5
6
# File 'lib/grumlin/path.rb', line 4

def objects
  @objects
end

Instance Method Details

#inspectObject



11
12
13
# File 'lib/grumlin/path.rb', line 11

def inspect
  "p[#{@objects}]"
end

#to_sObject



15
16
17
# File 'lib/grumlin/path.rb', line 15

def to_s
  inspect
end