Class: Y2R::AST::Ruby::Self

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)


1459
1460
1461
# File 'lib/y2r/ast/ruby.rb', line 1459

def hates_to_stand_alone?
  true
end

#priorityObject



1455
1456
1457
# File 'lib/y2r/ast/ruby.rb', line 1455

def priority
  Priority::ATOMIC
end

#single_line_width_base(context) ⇒ Object



1451
1452
1453
# File 'lib/y2r/ast/ruby.rb', line 1451

def single_line_width_base(context)
  4
end

#to_ruby_base(context) ⇒ Object



1447
1448
1449
# File 'lib/y2r/ast/ruby.rb', line 1447

def to_ruby_base(context)
  "self"
end