Class: Tracksperanto::ShakeGrammar::Catcher::At

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/import/shake_grammar/catcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(a, v) ⇒ At

Returns a new instance of At.



8
9
10
# File 'lib/import/shake_grammar/catcher.rb', line 8

def initialize(a, v)
  @at, @value = a, v
end

Instance Attribute Details

#atObject

Returns the value of attribute at.



6
7
8
# File 'lib/import/shake_grammar/catcher.rb', line 6

def at
  @at
end

#valueObject

Returns the value of attribute value.



6
7
8
# File 'lib/import/shake_grammar/catcher.rb', line 6

def value
  @value
end

Instance Method Details

#<=>(o) ⇒ Object



12
13
14
# File 'lib/import/shake_grammar/catcher.rb', line 12

def <=>(o)
  [@at, @value] <=> [o.at, o.value]
end

#inspectObject



16
17
18
# File 'lib/import/shake_grammar/catcher.rb', line 16

def inspect
  "(#{@value.inspect}@#{@at.inspect})"
end