Class: Ast::Ast::TokenDesc
- Inherits:
-
Object
- Object
- Ast::Ast::TokenDesc
- Defined in:
- lib/ast_ast/ast.rb
Overview
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ TokenDesc
constructor
A new instance of TokenDesc.
Constructor Details
#initialize(name, &block) ⇒ TokenDesc
Returns a new instance of TokenDesc.
9 10 11 12 |
# File 'lib/ast_ast/ast.rb', line 9 def initialize(name, &block) @name = name @block = block || Proc.new {|t| t} end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
7 8 9 |
# File 'lib/ast_ast/ast.rb', line 7 def block @block end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/ast_ast/ast.rb', line 7 def name @name end |