Class: Chronic::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/chronic/tag.rb

Overview

Tokens are tagged with subclassed instances of this class when they match specific criteria.

Direct Known Subclasses

Grabber, Ordinal, Pointer, Repeater, Scalar, Separator, Sign, TimeZone

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, options = {}) ⇒ Tag

type - The Symbol type of this tag.


9
10
11
12
# File 'lib/chronic/tag.rb', line 9

def initialize(type, options = {})
  @type = type
  @options = options
end

Instance Attribute Details

#typeObject

Returns the value of attribute type


6
7
8
# File 'lib/chronic/tag.rb', line 6

def type
  @type
end

Instance Method Details

#start=(time) ⇒ Object

time - Set the start Time for this Tag.


15
16
17
# File 'lib/chronic/tag.rb', line 15

def start=(time)
  @now = time
end