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