Class: Coradoc::Html::InputConfig
- Inherits:
-
Object
- Object
- Coradoc::Html::InputConfig
- Defined in:
- lib/coradoc/html/input_config.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ InputConfig
constructor
A new instance of InputConfig.
- #with(options = {}) ⇒ Object
Constructor Details
#initialize ⇒ InputConfig
Returns a new instance of InputConfig.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/coradoc/html/input_config.rb', line 8 def initialize @unknown_tags = :pass_through @input_format = :html @mathml2asciimath = false @external_images = false @destination = nil @sourcedir = nil @image_counter = 1 @image_counter_pattern = '%03d' @em_delimiter = '_' @strong_delimiter = '*' @inline_options = {} @tag_border = ' ' @split_sections = nil @doc_width = 1000 @plugins = [] @track_time = false end |
Class Method Details
.declare_option(option) ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/coradoc/html/input_config.rb', line 42 def self.declare_option(option) attr_accessor option original_reader = instance_method(option) define_method(option) do @inline_options[option] || original_reader.bind_call(self) end end |
Instance Method Details
#with(options = {}) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/coradoc/html/input_config.rb', line 34 def with( = {}) = @inline_options @inline_options = result = yield @inline_options = result end |