Class: ConceptQL::DateAdjuster
- Inherits:
-
Object
- Object
- ConceptQL::DateAdjuster
- Defined in:
- lib/conceptql/date_adjuster.rb
Overview
Used to translate a string of terse date adjustments into a set of adjustments that are compatible with most RDBMSs
Instance Attribute Summary collapse
-
#str ⇒ Object
readonly
Returns the value of attribute str.
Instance Method Summary collapse
-
#adjustments ⇒ Object
Returns an array of strings that represent date modifiers.
-
#initialize(str) ⇒ DateAdjuster
constructor
A new instance of DateAdjuster.
Constructor Details
#initialize(str) ⇒ DateAdjuster
7 8 9 |
# File 'lib/conceptql/date_adjuster.rb', line 7 def initialize(str) @str = str end |
Instance Attribute Details
#str ⇒ Object (readonly)
Returns the value of attribute str.
6 7 8 |
# File 'lib/conceptql/date_adjuster.rb', line 6 def str @str end |
Instance Method Details
#adjustments ⇒ Object
Returns an array of strings that represent date modifiers
12 13 14 |
# File 'lib/conceptql/date_adjuster.rb', line 12 def adjustments @adjustments ||= parse(str) end |