Class: Y2R::AST::Ruby::Else
- Inherits:
-
Node
- Object
- OpenStruct
- Node
- Y2R::AST::Ruby::Else
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?, #hates_to_stand_alone?, #pass_trailer?, #single_line_width, #starts_with_comment?, #to_ruby
Instance Method Details
#priority ⇒ Object
631
632
633
|
# File 'lib/y2r/ast/ruby.rb', line 631
def priority
Priority::NONE
end
|
#single_line_width_base(context) ⇒ Object
627
628
629
|
# File 'lib/y2r/ast/ruby.rb', line 627
def single_line_width_base(context)
Float::INFINITY end
|
#to_ruby_base(context) ⇒ Object
620
621
622
623
624
625
|
# File 'lib/y2r/ast/ruby.rb', line 620
def to_ruby_base(context)
combine do |parts|
parts << "else"
parts << indented(body, context.with_priority(priority))
end
end
|