Class: CodeRay::Encoders::YAML

Inherits:
Encoder show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb

Overview

YAML Encoder

Slow.

Constant Summary collapse

FILE_EXTENSION =
'yaml'

Constants inherited from Encoder

Encoder::DEFAULT_OPTIONS

Instance Attribute Summary

Attributes inherited from Encoder

#options, #scanner

Attributes included from Plugin

#plugin_id

Instance Method Summary collapse

Methods inherited from Encoder

#<<, const_missing, #encode, #encode_tokens, file_extension, #file_extension, #initialize, #token

Methods included from Plugin

#aliases, #plugin_host, #register_for, #title

Constructor Details

This class inherits a constructor from CodeRay::Encoders::Encoder

Instance Method Details

#begin_group(kind) ⇒ Object



31
32
33
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb', line 31

def begin_group kind
  @data << [:begin_group, kind]
end

#begin_line(kind) ⇒ Object



39
40
41
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb', line 39

def begin_line kind
  @data << [:begin_line, kind]
end

#end_group(kind) ⇒ Object



35
36
37
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb', line 35

def end_group kind
  @data << [:end_group, kind]
end

#end_line(kind) ⇒ Object



43
44
45
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb', line 43

def end_line kind
  @data << [:end_line, kind]
end

#text_token(text, kind) ⇒ Object



27
28
29
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb', line 27

def text_token text, kind
  @data << [text, kind]
end