Class: ReverseMarkdown::Config
- Inherits:
-
Object
- Object
- ReverseMarkdown::Config
- Defined in:
- lib/reverse_markdown/config.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #with(options = {}) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 10 11 12 13 |
# File 'lib/reverse_markdown/config.rb', line 5 def initialize @unknown_tags = :pass_through @github_flavored = false @force_encoding = false @em_delimiter = '_'.freeze @strong_delimiter = '**'.freeze @inline_options = {} @tag_border = ' '.freeze end |
Instance Attribute Details
#force_encoding ⇒ Object
34 35 36 |
# File 'lib/reverse_markdown/config.rb', line 34 def force_encoding @inline_options[:force_encoding] || @force_encoding end |
#github_flavored ⇒ Object
26 27 28 |
# File 'lib/reverse_markdown/config.rb', line 26 def github_flavored @inline_options[:github_flavored] || @github_flavored end |
#tag_border ⇒ Object
30 31 32 |
# File 'lib/reverse_markdown/config.rb', line 30 def tag_border @inline_options[:tag_border] || @tag_border end |
#unknown_tags ⇒ Object
22 23 24 |
# File 'lib/reverse_markdown/config.rb', line 22 def @inline_options[:unknown_tags] || @unknown_tags end |
Instance Method Details
#with(options = {}) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/reverse_markdown/config.rb', line 15 def with( = {}) @inline_options = result = yield @inline_options = {} result end |