Class: SQLite::ParsedStatement::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/sqlite/parsed_statement.rb

Overview

This represents a textual token in an SQL statement. It is only used by ParsedStatement.

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Token

Create a new Token that encapsulates the given text.



50
51
52
# File 'lib/sqlite/parsed_statement.rb', line 50

def initialize( text )
  @text = text
end

Instance Method Details

#<<(text) ⇒ Object

Append the given text onto the the contents of this Token.



55
56
57
# File 'lib/sqlite/parsed_statement.rb', line 55

def <<( text )
  @text << text.to_s
end

#to_s(vars = nil) ⇒ Object

Convert this Token into a string. The vars parameter is ignored.



60
61
62
# File 'lib/sqlite/parsed_statement.rb', line 60

def to_s( vars=nil )
  @text
end