Class: ReverseAdoc::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/reverse_adoc/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/reverse_adoc/config.rb', line 8

def initialize
  @unknown_tags     = :pass_through
  @input_format     = :html
  @mathml2asciimath = false
  @external_images  = false

  # Destination to save file and images
  @destination      = nil

  # Source of HTML
  # @sourcedir        = nil

  # Image counter, assuming there are max 999 images
  @image_counter    = 1
  # pad with 0s
  @image_counter_pattern = '%03d'

  @em_delimiter     = '_'.freeze
  @strong_delimiter = '*'.freeze
  @inline_options   = {}
  @tag_border       = ' '.freeze
end

Instance Attribute Details

#destinationObject

Returns the value of attribute destination.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def destination
  @destination
end

#external_imagesObject

Returns the value of attribute external_images.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def external_images
  @external_images
end

#image_counterObject

Returns the value of attribute image_counter.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def image_counter
  @image_counter
end

#image_counter_patternObject

Returns the value of attribute image_counter_pattern.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def image_counter_pattern
  @image_counter_pattern
end

#input_formatObject

Returns the value of attribute input_format.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def input_format
  @input_format
end

#mathml2asciimathObject

Returns the value of attribute mathml2asciimath.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def mathml2asciimath
  @mathml2asciimath
end

#sourcedirObject

Returns the value of attribute sourcedir.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def sourcedir
  @sourcedir
end

#tag_borderObject

Returns the value of attribute tag_border.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def tag_border
  @tag_border
end

#unknown_tagsObject

Returns the value of attribute unknown_tags.



5
6
7
# File 'lib/reverse_adoc/config.rb', line 5

def unknown_tags
  @unknown_tags
end

Instance Method Details

#with(options = {}) ⇒ Object



31
32
33
34
35
36
# File 'lib/reverse_adoc/config.rb', line 31

def with(options = {})
  @inline_options = options
  result = yield
  @inline_options = {}
  result
end