Class: Microscope::Scope::DateScope
- Inherits:
-
DatetimeScope
- Object
- Microscope::Scope
- DatetimeScope
- Microscope::Scope::DateScope
- Defined in:
- lib/microscope/scope/date_scope.rb
Instance Attribute Summary
Attributes inherited from Microscope::Scope
Instance Method Summary collapse
-
#initialize(*args) ⇒ DateScope
constructor
A new instance of DateScope.
Methods inherited from DatetimeScope
Methods inherited from Microscope::Scope
#cropped_field, inject_scopes, #quoted_field
Constructor Details
#initialize(*args) ⇒ DateScope
Returns a new instance of DateScope.
4 5 6 7 8 9 10 11 12 |
# File 'lib/microscope/scope/date_scope.rb', line 4 def initialize(*args) super @now = 'Date.today' @now_suffix = '_today' @specific_suffix = '_on' @cropped_field_regex = /_on$/ @formatted_time = 'time.try(:strftime, \'%Y-%m-%d\')' end |