Class: ToSource::Emitter::KeywordValue::Break

Inherits:
ToSource::Emitter::KeywordValue show all
Defined in:
lib/to_source/emitter/keyword_value.rb

Overview

Emitter for break nodes

Constant Summary collapse

SYMBOL =
:break

Constants inherited from ToSource::Emitter

REGISTRY

Instance Attribute Summary

Attributes inherited from ToSource::Emitter

#buffer, #node

Instance Method Summary collapse

Methods inherited from ToSource::Emitter

build, define_predicate, #initialize, run, #source

Constructor Details

This class inherits a constructor from ToSource::Emitter

Instance Method Details

#value?true, false

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if value is present

Returns:

  • (true)

    if value is present

  • (false)

    otherwise



59
60
61
# File 'lib/to_source/emitter/keyword_value.rb', line 59

def value?
  !node.value.kind_of?(Rubinius::AST::NilLiteral)
end