Class: TwilioContactable::Contactable::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Configuration

Returns a new instance of Configuration.

Yields:

  • (_self)

Yield Parameters:



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/contactable.rb', line 25

def initialize

  yield self if block_given?

  Attributes.each do |attr|
    # set the defaults if the user hasn't specified anything
    if send("#{attr}_column").blank?
      send("#{attr}_column=", attr)
    end
  end
end

Instance Attribute Details

#controllerObject

the following is set when a controller includes TwilioContactable and calls twilio_contactable with this model as an argument



23
24
25
# File 'lib/contactable.rb', line 23

def controller
  @controller
end