Class: CodeRay::Encoders::Text
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/text.rb
Overview
Concats the tokens into a single string, resulting in the original code string if no tokens were removed.
Alias: plain
, plaintext
Options
:separator
A separator string to join the tokens.
Default: empty String
Constant Summary collapse
- FILE_EXTENSION =
'txt'
- DEFAULT_OPTIONS =
{ :separator => nil }
Instance Attribute Summary
Attributes inherited from Encoder
Attributes included from Plugin
Instance Method Summary collapse
Methods inherited from Encoder
#<<, #begin_group, #begin_line, const_missing, #encode, #encode_tokens, #end_group, #end_line, #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
#text_token(text, kind) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/coderay-1.1.3/lib/coderay/encoders/text.rb', line 25 def text_token text, kind super if @first @first = false else @out << @sep end if @sep end |