class

Cronic::Token

Inherits Reference < Object

Constructors

new(word : String, text : String = "", position : Int32 = 0)
Source

Instance methods

==(token)

Returns false (other can only be a Value here).

Source
get_tag(tg_class : Class)

tag_class - The tag Class to search for. Returns The first Tag that matches the given class.

Source
has_tag(tg_class : Class)
Source
inspect

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.

Source
position
Source
tag(new_tag : Tag | Nil)

Tag this token with the specified tag. Returns nothing.

Source
tagged?

Returns true if this token has any tags.

Source
tags
Source
tags=(tags : Array(Cronic::Tag))
Source
text
Source
to_s

Print this Token in a pretty way

Source
untag(tag_class)
Source
word
Source
word=(word : String)
Source