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.



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

def column
  @column
end

#line_noInteger (readonly)

Returns the line number.

Returns:

  • (Integer)

    the line number.



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

def line_no
  @line_no
end

#nameString (readonly)

Returns the name.

Returns:

  • (String)

    the name.



75
76
77
# File 'lib/yadriggy/ast.rb', line 75

def name
  @name
end

Instance Method Details

#to_symSymbol

Converts the name to a symbol

Returns:

  • (Symbol)

    the converted symbol.



85
86
87
# File 'lib/yadriggy/ast.rb', line 85

def to_sym
  @name.to_sym
end