Class: Redcarpet::Render::SeeingIsBelieving::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/redcarpet/render/seeing_is_believing/options.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(show_exceptions: false) ⇒ Options

Returns a new instance of Options.



13
14
15
# File 'lib/redcarpet/render/seeing_is_believing/options.rb', line 13

def initialize(show_exceptions: false)
  @show_exceptions = show_exceptions
end

Instance Attribute Details

#show_exceptionsObject (readonly)

Returns the value of attribute show_exceptions.



5
6
7
# File 'lib/redcarpet/render/seeing_is_believing/options.rb', line 5

def show_exceptions
  @show_exceptions
end

Class Method Details

.parse(language) ⇒ Object



7
8
9
10
11
# File 'lib/redcarpet/render/seeing_is_believing/options.rb', line 7

def self.parse(language)
  options = language.partition("+").last

  new(show_exceptions: options.include?("e"))
end