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.



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

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

Instance Attribute Details

#atObject

Returns the value of attribute at.



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

def at
  @at
end

#valueObject

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#<=>(o) ⇒ Object



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

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

#inspectObject



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

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