Class: BootstrapEmail::ConfigStore

Inherits:
Object
  • Object
show all
Defined in:
lib/bootstrap-email/config_store.rb

Constant Summary collapse

OPTIONS =
[
  :sass_email_location,     # path to main sass file
  :sass_head_location,      # path to head sass file
  :sass_email_string,       # main sass file passed in as a string
  :sass_head_string,        # head sass file passed in as a string
  :sass_load_paths,         # array of directories for loading sass imports
  :sass_cache_location,     # path to tmp folder for sass cache
  :sass_log_enabled,        # turn on or off sass log when caching new sass
  :generate_rails_text_part # boolean for whether or not to generate the text part in rails, default: true
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(options = []) ⇒ ConfigStore

Returns a new instance of ConfigStore.



18
19
20
21
# File 'lib/bootstrap-email/config_store.rb', line 18

def initialize(options = [])
  defaults
  options.each { |name, value| instance_variable_set("@#{name}", value) if OPTIONS.include?(name) }
end

Instance Method Details

#did_set?(option) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bootstrap-email/config_store.rb', line 23

def did_set?(option)
  instance_variable_defined?("@#{option}")
end