Class: ERLE::Binary

Inherits:
Enum show all
Defined in:
lib/erle/elements/binary.rb

Instance Attribute Summary

Attributes inherited from Enum

#terms

Attributes inherited from Term

#input, #output

Instance Method Summary collapse

Methods inherited from Enum

delimeter_regex, #initialize, parse, until_delimeter

Methods inherited from Term

enclosure, #initialize, parse, pattern, to_ruby, until_any_closing

Constructor Details

This class inherits a constructor from ERLE::Enum

Instance Method Details

#to_rubyObject

TODO: handle specification. erlang.org/doc/reference_manual/expressions.html#bit_syntax Ei = Value |

Value:Size |
Value/TypeSpecifierList |
Value:Size/TypeSpecifierList


13
14
15
16
# File 'lib/erle/elements/binary.rb', line 13

def to_ruby
  # using a string literal as in <<"abc">> is syntactic sugar for <<$a,$b,$c>>.
  @output ||= one_or_all(terms_to_ruby)
end