Permalink
Browse files

remove explicit references to self in handlers

  • Loading branch information...
1 parent c96ca67 commit 82fcc11686dfca7b1bd5068aa950a0557723b4a4 Lee Jarvis committed Jun 9, 2011
Showing with 10 additions and 10 deletions.
  1. +10 −10 lib/chronic/handlers.rb
View
@@ -102,7 +102,7 @@ def handle_rmn_od_sy(tokens, options) #:nodoc:
def handle_sd_rmn_sy(tokens, options) #:nodoc:
new_tokens = [tokens[1], tokens[0], tokens[2]]
time_tokens = tokens.last(tokens.size - 3)
- self.handle_rmn_sd_sy(new_tokens + time_tokens, options)
+ handle_rmn_sd_sy(new_tokens + time_tokens, options)
end
# Handle scalar-month/scalar-day/scalar-year (endian middle)
@@ -125,14 +125,14 @@ def handle_sm_sd_sy(tokens, options) #:nodoc:
def handle_sd_sm_sy(tokens, options) #:nodoc:
new_tokens = [tokens[1], tokens[0], tokens[2]]
time_tokens = tokens.last(tokens.size - 3)
- self.handle_sm_sd_sy(new_tokens + time_tokens, options)
+ handle_sm_sd_sy(new_tokens + time_tokens, options)
end
# Handle scalar-year/scalar-month/scalar-day
def handle_sy_sm_sd(tokens, options) #:nodoc:
new_tokens = [tokens[1], tokens[2], tokens[0]]
time_tokens = tokens.last(tokens.size - 3)
- self.handle_sm_sd_sy(new_tokens + time_tokens, options)
+ handle_sm_sd_sy(new_tokens + time_tokens, options)
end
# Handle scalar-month/scalar-year
@@ -160,13 +160,13 @@ def handle_sm_sy(tokens, options) #:nodoc:
# Handle repeaters
def handle_r(tokens, options) #:nodoc:
dd_tokens = dealias_and_disambiguate_times(tokens, options)
- self.get_anchor(dd_tokens, options)
+ get_anchor(dd_tokens, options)
end
# Handle repeater/grabber/repeater
def handle_r_g_r(tokens, options) #:nodoc:
new_tokens = [tokens[1], tokens[0], tokens[2]]
- self.handle_r(new_tokens, options)
+ handle_r(new_tokens, options)
end
# arrows
@@ -185,19 +185,19 @@ def handle_s_r_p(tokens, options) #:nodoc:
repeater = tokens[1].get_tag(Repeater)
span = Span.new(Chronic.now, Chronic.now + 1)
- self.handle_srp(tokens, span, options)
+ handle_srp(tokens, span, options)
end
# Handle pointer/scalar/repeater
def handle_p_s_r(tokens, options) #:nodoc:
new_tokens = [tokens[1], tokens[2], tokens[0]]
- self.handle_s_r_p(new_tokens, options)
+ handle_s_r_p(new_tokens, options)
end
# Handle scalar/repeater/pointer/anchor
def handle_s_r_p_a(tokens, options) #:nodoc:
anchor_span = get_anchor(tokens[3..tokens.size - 1], options)
- self.handle_srp(tokens, anchor_span, options)
+ handle_srp(tokens, anchor_span, options)
end
# narrows
@@ -247,7 +247,7 @@ def get_anchor(tokens, options) #:nodoc:
grabber = Grabber.new(:this)
pointer = :future
- repeaters = self.get_repeaters(tokens)
+ repeaters = get_repeaters(tokens)
repeaters.size.times { tokens.pop }
if tokens.first && tokens.first.get_tag(Grabber)
@@ -398,7 +398,7 @@ def match(tokens, definitions)
end
def ==(other)
- self.pattern == other.pattern
+ @pattern == other.pattern
end
end

0 comments on commit 82fcc11

Please sign in to comment.