Class: Tzispa::Rig::TypeToken::Meta

Inherits:
Tzispa::Rig::Token show all
Defined in:
lib/tzispa/rig/type_token/expression.rb

Constant Summary

Constants inherited from Tzispa::Rig::Token

Tzispa::Rig::Token::RE_ANCHOR

Instance Attribute Summary collapse

Attributes inherited from Tzispa::Rig::Token

#parser, #type

Instance Method Summary collapse

Methods inherited from Tzispa::Rig::Token

#anchor, instance

Constructor Details

#initialize(parser, match) ⇒ Meta

Returns a new instance of Meta.



12
13
14
15
# File 'lib/tzispa/rig/type_token/expression.rb', line 12

def initialize(parser, match)
  super(parser, :meta)
  @id = match[1].to_sym
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/tzispa/rig/type_token/expression.rb', line 10

def id
  @id
end

Instance Method Details

#render(binder) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/tzispa/rig/type_token/expression.rb', line 17

def render(binder)
  if binder.data.respond_to? @id
    binder.data.send(@id).to_s
  else
    unknown
  end
end