Class: Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin
- Inherits:
-
Object
- Object
- Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin
- Includes:
- Element, GetText, Ext::Entity, Ext::Inline
- Defined in:
- lib/rabbit/parser/wiki/output.rb
Defined Under Namespace
Classes: Private
Constant Summary
Constants included from Ext::Entity
Constants included from GetText
Instance Method Summary collapse
- #br ⇒ Object
- #code_point(code_point, *rest) ⇒ Object
- #entity(entity, *rest) ⇒ Object (also: #e)
- #image(source, props = {}) ⇒ Object
-
#initialize(output) ⇒ InlinePlugin
constructor
A new instance of InlinePlugin.
- #lang(lang, text, *rest) ⇒ Object
- #note(text, *rest) ⇒ Object
- #sub(text, *rest) ⇒ Object
- #sup(text, *rest) ⇒ Object
- #tag(name, text = nil, *rest) ⇒ Object
- #wait ⇒ Object
Methods included from Ext::Inline
Methods included from GetText
Constructor Details
#initialize(output) ⇒ InlinePlugin
Returns a new instance of InlinePlugin.
383 384 385 |
# File 'lib/rabbit/parser/wiki/output.rb', line 383 def initialize(output) @private = Private.new(output) end |
Instance Method Details
#br ⇒ Object
419 420 421 |
# File 'lib/rabbit/parser/wiki/output.rb', line 419 def br Text.new("\n") end |
#code_point(code_point, *rest) ⇒ Object
399 400 401 |
# File 'lib/rabbit/parser/wiki/output.rb', line 399 def code_point(code_point, *rest) @private.pack(Text.new([code_point].pack("U")), *rest) end |
#entity(entity, *rest) ⇒ Object Also known as: e
392 393 394 395 396 |
# File 'lib/rabbit/parser/wiki/output.rb', line 392 def entity(entity, *rest) return nil unless TABLE.include?(entity) @private.pack(Text.new(TABLE[entity]), *rest) end |
#image(source, props = {}) ⇒ Object
387 388 389 390 |
# File 'lib/rabbit/parser/wiki/output.rb', line 387 def image(source, props={}) raise ParseError, _("inline {{image(...)}} isn't supported.") end |
#lang(lang, text, *rest) ⇒ Object
415 416 417 |
# File 'lib/rabbit/parser/wiki/output.rb', line 415 def lang(lang, text, *rest) super(lang, @private.pack(text, *rest)) end |
#note(text, *rest) ⇒ Object
411 412 413 |
# File 'lib/rabbit/parser/wiki/output.rb', line 411 def note(text, *rest) super(@private.pack(text, *rest)) end |
#sub(text, *rest) ⇒ Object
403 404 405 |
# File 'lib/rabbit/parser/wiki/output.rb', line 403 def sub(text, *rest) super(@private.pack(text, *rest)) end |
#sup(text, *rest) ⇒ Object
407 408 409 |
# File 'lib/rabbit/parser/wiki/output.rb', line 407 def sup(text, *rest) super(@private.pack(text, *rest)) end |