Class: FluentQuery::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent-query/token.rb

Overview

Represents general query token.

Direct Known Subclasses

FluentQuery::Tokens::Raw

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, arguments) ⇒ Token

Returns a new instance of Token.



35
36
37
38
# File 'lib/fluent-query/token.rb', line 35

def initialize(name, arguments)
    @_name = name
    @arguments = arguments
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



28
29
30
# File 'lib/fluent-query/token.rb', line 28

def arguments
  @arguments
end

Instance Method Details

#alias=(_alias) ⇒ Object



67
68
69
# File 'lib/fluent-query/token.rb', line 67

def alias=(_alias)
    @_alias = _alias
end

#nameObject



45
46
47
48
49
50
51
# File 'lib/fluent-query/token.rb', line 45

def name
    if @_alias
        return @_alias
    else
        return @_name
    end
end

#original_nameObject



58
59
60
# File 'lib/fluent-query/token.rb', line 58

def original_name
    @_name
end