Class: Yadriggy::Name

Inherits:
ASTnode show all
Defined in:
lib/yadriggy/ast.rb

Overview

Abstract class.

Instance Attribute Summary collapse

Attributes inherited from ASTnode

#parent, #usertype

Instance Method Summary collapse

Methods inherited from ASTnode

#add_child, #add_children, #const_value, #const_value_in_class, #get_context_class, #get_receiver_object, #is_proc?, #pretty_print, #root, #source_location, #source_location_string, #value, #value_in_class

Instance Attribute Details

#columnInteger (readonly)

Returns the column.

Returns:

  • (Integer)

    the column.



83
84
85
# File 'lib/yadriggy/ast.rb', line 83

def column
  @column
end

#line_noInteger (readonly)

Returns the line number.

Returns:

  • (Integer)

    the line number.



80
81
82
# File 'lib/yadriggy/ast.rb', line 80

def line_no
  @line_no
end

#nameString (readonly)

Returns the name.

Returns:

  • (String)

    the name.



77
78
79
# File 'lib/yadriggy/ast.rb', line 77

def name
  @name
end

Instance Method Details

#to_symSymbol

Converts the name to a symbol

Returns:

  • (Symbol)

    the converted symbol.



87
88
89
# File 'lib/yadriggy/ast.rb', line 87

def to_sym
  @name.to_sym
end