Class: RedisCacheMailerDelivery::MarshallableConverterSetting

Inherits:
Object
  • Object
show all
Defined in:
lib/redis_cache_mailer_delivery/marshallable_converter_setting.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(converter_name) ⇒ MarshallableConverterSetting

Returns a new instance of MarshallableConverterSetting.



10
11
12
# File 'lib/redis_cache_mailer_delivery/marshallable_converter_setting.rb', line 10

def initialize(converter_name)
  @converter_name = converter_name
end

Instance Attribute Details

#converter_nameObject (readonly)

Returns the value of attribute converter_name.



3
4
5
# File 'lib/redis_cache_mailer_delivery/marshallable_converter_setting.rb', line 3

def converter_name
  @converter_name
end

Class Method Details

.builtin_settingsObject



5
6
7
# File 'lib/redis_cache_mailer_delivery/marshallable_converter_setting.rb', line 5

def builtin_settings
  { :sequel_record_marshallable => RedisCacheMailerDelivery::Converters::SequelMarshallableMailMessage }
end

Instance Method Details

#marshallable_classObject



14
15
16
17
# File 'lib/redis_cache_mailer_delivery/marshallable_converter_setting.rb', line 14

def marshallable_class
  builtin_class = self.class.builtin_settings[converter_name]
  builtin_class.nil? ? converter_name : builtin_class
end