Class: Kreuzberg::Config::Email

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

Overview

Email extraction configuration

Examples:

With fallback codepage

email = Email.new(msg_fallback_codepage: 1251)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg_fallback_codepage: nil) ⇒ Email

Returns a new instance of Email.



848
849
850
# File 'lib/kreuzberg/config.rb', line 848

def initialize(msg_fallback_codepage: nil)
  @msg_fallback_codepage = msg_fallback_codepage&.to_i
end

Instance Attribute Details

#msg_fallback_codepageObject (readonly)

Returns the value of attribute msg_fallback_codepage.



846
847
848
# File 'lib/kreuzberg/config.rb', line 846

def msg_fallback_codepage
  @msg_fallback_codepage
end

Instance Method Details

#to_hObject



852
853
854
855
856
# File 'lib/kreuzberg/config.rb', line 852

def to_h
  h = {}
  h[:msg_fallback_codepage] = @msg_fallback_codepage unless @msg_fallback_codepage.nil?
  h
end