Class: Y2R::AST::Ruby::Variable

Inherits:
Node
  • Object
show all
Defined in:
lib/y2r/ast/ruby.rb

Constant Summary

Constants inherited from Node

Node::INDENT_STEP

Instance Method Summary collapse

Methods inherited from Node

#ends_with_comment?, #ensure_separated, #has_comment?, #pass_trailer?, #single_line_width, #starts_with_comment?, #to_ruby

Instance Method Details

#hates_to_stand_alone?Boolean

Returns:

  • (Boolean)


1441
1442
1443
# File 'lib/y2r/ast/ruby.rb', line 1441

def hates_to_stand_alone?
  true
end

#priorityObject



1437
1438
1439
# File 'lib/y2r/ast/ruby.rb', line 1437

def priority
  Priority::ATOMIC
end

#single_line_width_base(context) ⇒ Object



1433
1434
1435
# File 'lib/y2r/ast/ruby.rb', line 1433

def single_line_width_base(context)
  name.size
end

#to_ruby_base(context) ⇒ Object



1429
1430
1431
# File 'lib/y2r/ast/ruby.rb', line 1429

def to_ruby_base(context)
  name
end