Class: PrawnEncoder
- Inherits:
-
CodeRay::Encoders::Encoder
- Object
- CodeRay::Encoders::Encoder
- PrawnEncoder
- Defined in:
- lib/coderay/prawn_encoder.rb
Constant Summary collapse
- COLORS =
{ default: "E6E1DC", comment: "BC9458", constant: "DA4939", instance_variable: "D0D0FF", integer: "56D65E", float: "56D65E", inline_delimiter: "EF804F", keyword: "CC7833", method: "FFC66D", string: "A5C261", symbol: "6D9CBE" }
Instance Method Summary collapse
- #begin_group(kind) ⇒ Object
- #end_group(kind) ⇒ Object
- #setup(options) ⇒ Object
- #text_token(text, kind) ⇒ Object
Instance Method Details
#begin_group(kind) ⇒ Object
32 33 34 |
# File 'lib/coderay/prawn_encoder.rb', line 32 def begin_group(kind) @open << kind end |
#end_group(kind) ⇒ Object
36 37 38 |
# File 'lib/coderay/prawn_encoder.rb', line 36 def end_group(kind) @open.pop end |
#setup(options) ⇒ Object
20 21 22 23 24 |
# File 'lib/coderay/prawn_encoder.rb', line 20 def setup() super @out = [] @open = [] end |