Exception: Cliptic::Errors::Invalid_Date

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cliptic/lib.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(date) ⇒ Invalid_Date

Returns a new instance of Invalid_Date.



53
54
55
# File 'lib/cliptic/lib.rb', line 53

def initialize(date)
  @date = date
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



52
53
54
# File 'lib/cliptic/lib.rb', line 52

def date
  @date
end

Instance Method Details

#messageObject



56
57
58
59
60
61
# File 'lib/cliptic/lib.rb', line 56

def message
  <<~msg
  Invalid date passed #{date}
  Earliest date #{Date.today<<9}
  msg
end