Module: XLSXToHTML::Helpers

Included in:
Renderer, SpreadsheetParser
Defined in:
lib/xlsx_to_html/helpers.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object

For accessing configuration methods directly



4
5
6
7
8
# File 'lib/xlsx_to_html/helpers.rb', line 4

def method_missing(method_name, *args)
  super unless XLSXToHTML.configuration.respond_to? method_name

  XLSXToHTML.configuration.public_send(method_name)
end

Instance Method Details

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/xlsx_to_html/helpers.rb', line 10

def respond_to_missing?(method_name, include_private = false)
  XLSXToHTML.configuration.respond_to?(method_name) || super
end