Class: UcbRailsUser::Configuration::Email

Inherits:
Object
  • Object
show all
Defined in:
app/models/ucb_rails_user/configuration/email.rb

Constant Summary collapse

ArgumentError =
Class.new(StandardError)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration_hash) ⇒ Email

Returns a new instance of Email.

Raises:



12
13
14
15
16
17
18
# File 'app/models/ucb_rails_user/configuration/email.rb', line 12

def initialize(configuration_hash)
  return if configuration_hash.nil?
  raise(ArgumentError, "expected a Hash, got: #{configuration_hash.inspect}") unless configuration_hash.is_a?(Hash)

  self.hash = configuration_hash
  process_configuration
end

Instance Attribute Details

#hashObject

Returns the value of attribute hash.



6
7
8
# File 'app/models/ucb_rails_user/configuration/email.rb', line 6

def hash
  @hash
end

Class Method Details

.configure(config) ⇒ Object



8
9
10
# File 'app/models/ucb_rails_user/configuration/email.rb', line 8

def self.configure(config)
  new(config)
end