Class: Parser::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/parser/checker.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(datetime) ⇒ Checker

Returns a new instance of Checker.



9
10
11
# File 'lib/parser/checker.rb', line 9

def initialize(datetime)
  @datetime = datetime
end

Class Method Details

.unusual?(datetime) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/parser/checker.rb', line 5

def self.unusual?(datetime)
  new(datetime).unusual?
end

Instance Method Details

#unusual?Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/parser/checker.rb', line 13

def unusual?
  return true if weekend? || before? || after?
  false
end