Class: DMark::Tokens::TextToken

Inherits:
Token
  • Object
show all
Defined in:
lib/dmark/tokens.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text:) ⇒ TextToken

Returns a new instance of TextToken.



12
13
14
# File 'lib/dmark/tokens.rb', line 12

def initialize(text:)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



10
11
12
# File 'lib/dmark/tokens.rb', line 10

def text
  @text
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/dmark/tokens.rb', line 16

def to_s
  "Text(#{@text.inspect})"
end