Module: Sequel::DateParseInputHandler
- Included in:
- Sequel
- Defined in:
- lib/sequel/extensions/date_parse_input_handler.rb
Instance Method Summary collapse
- #date_parse_input_handler(&block) ⇒ Object
-
#string_to_date(string) ⇒ Object
Call date parse input handler with input string.
-
#string_to_datetime(string) ⇒ Object
Call date parse input handler with input string.
-
#string_to_time(string) ⇒ Object
Call date parse input handler with input string.
Instance Method Details
#date_parse_input_handler(&block) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/sequel/extensions/date_parse_input_handler.rb', line 30 def date_parse_input_handler(&block) singleton_class.class_eval do define_method(:handle_date_parse_input, &block) private :handle_date_parse_input alias handle_date_parse_input handle_date_parse_input end end |
#string_to_date(string) ⇒ Object
Call date parse input handler with input string.
39 40 41 |
# File 'lib/sequel/extensions/date_parse_input_handler.rb', line 39 def string_to_date(string) super(handle_date_parse_input(string)) end |
#string_to_datetime(string) ⇒ Object
Call date parse input handler with input string.
44 45 46 |
# File 'lib/sequel/extensions/date_parse_input_handler.rb', line 44 def string_to_datetime(string) super(handle_date_parse_input(string)) end |
#string_to_time(string) ⇒ Object
Call date parse input handler with input string.
49 50 51 |
# File 'lib/sequel/extensions/date_parse_input_handler.rb', line 49 def string_to_time(string) super(handle_date_parse_input(string)) end |