Class: Chronic::SpanDictionary
- Inherits:
-
Dictionary
- Object
- Dictionary
- Chronic::SpanDictionary
- Defined in:
- lib/chronic/dictionary.rb
Instance Attribute Summary
Attributes inherited from Dictionary
Instance Method Summary collapse
-
#[](handler_type = :symbol) ⇒ Object
returns the definitions of a specific subclass of SpanDefinitions SpanDefinition#definitions returns an Hash of Handler instances arguments should come in as symbols.
-
#initialize(options = {}) ⇒ SpanDictionary
constructor
Collection of SpanDefinitions.
Methods inherited from Dictionary
Constructor Details
#initialize(options = {}) ⇒ SpanDictionary
Collection of SpanDefinitions
24 25 26 27 |
# File 'lib/chronic/dictionary.rb', line 24 def initialize( = {}) super @defined_items = [:time,:date,:anchor,:arrow,:narrow,:endian] end |
Instance Method Details
#[](handler_type = :symbol) ⇒ Object
returns the definitions of a specific subclass of SpanDefinitions SpanDefinition#definitions returns an Hash of Handler instances arguments should come in as symbols
32 33 34 |
# File 'lib/chronic/dictionary.rb', line 32 def [](handler_type=:symbol) definitions[handler_type] end |