Class: ActsAsNewsletter::Model::Config
- Inherits:
-
Object
- Object
- ActsAsNewsletter::Model::Config
- Defined in:
- lib/acts_as_newsletter/model/config.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(model, &block) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(model, &block) ⇒ Config
Returns a new instance of Config.
6 7 8 9 10 11 12 |
# File 'lib/acts_as_newsletter/model/config.rb', line 6 def initialize model, &block # Initialize config default values @config = { emails: [], layout: false } @model = model # Eval block to edit config instance_eval &block if block_given? end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/acts_as_newsletter/model/config.rb', line 4 def config @config end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
4 5 6 |
# File 'lib/acts_as_newsletter/model/config.rb', line 4 def model @model end |