Class: ContactForm::Form
- Inherits:
-
Object
- Object
- ContactForm::Form
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Validations
- Defined in:
- app/models/contact_form/form.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Form
constructor
A new instance of Form.
- #persisted? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ Form
Returns a new instance of Form.
14 15 16 17 18 |
# File 'app/models/contact_form/form.rb', line 14 def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
8 9 10 |
# File 'app/models/contact_form/form.rb', line 8 def email @email end |
#message ⇒ Object
Returns the value of attribute message.
8 9 10 |
# File 'app/models/contact_form/form.rb', line 8 def @message end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'app/models/contact_form/form.rb', line 8 def name @name end |
Instance Method Details
#persisted? ⇒ Boolean
20 21 22 |
# File 'app/models/contact_form/form.rb', line 20 def persisted? false end |