Module: BELParser::Parsers::Buffer
- Included in:
- BELParser::Parsers::BELScript::DefineAnnotation::Parser, BELParser::Parsers::BELScript::DefineNamespace::Parser, BELParser::Parsers::BELScript::Set::Parser, BELParser::Parsers::BELScript::SetDocument::Parser, BELParser::Parsers::BELScript::Unset::Parser, Common::BlankLine::Parser, Common::CommentLine::Parser, Common::Function::Parser, Common::Identifier::Parser, Common::List::Parser, Common::MultiIdentifier::Parser, Common::String::Parser, Expression::Comment::Parser, Expression::NestedStatement::Parser, Expression::ObservedTerm::Parser, Expression::Parameter::Parser, Expression::Relationship::Parser, Expression::SimpleStatement::Parser, Expression::StatementAutocomplete::Parser, Expression::Term::Parser
- Defined in:
- lib/bel_parser/parsers/mixin/buffer.rb
Overview
Buffer module.
Instance Method Summary collapse
Instance Method Details
#ord_to_str(enumerable) ⇒ Object
9 10 11 |
# File 'lib/bel_parser/parsers/mixin/buffer.rb', line 9 def ord_to_str(enumerable) (enumerable.map { |x| x.chr }).join() end |
#utf8_string(buffer) ⇒ Object
5 6 7 |
# File 'lib/bel_parser/parsers/mixin/buffer.rb', line 5 def utf8_string(buffer) buffer.pack('C*').force_encoding('utf-8') end |