Class: Contact
- Inherits:
-
Object
- Object
- Contact
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Validations
- Defined in:
- lib/forge/app/models/contact.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#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.
15 16 17 18 19 |
# File 'lib/forge/app/models/contact.rb', line 15 def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
6 7 8 |
# File 'lib/forge/app/models/contact.rb', line 6 def content @content end |
#email ⇒ Object
Returns the value of attribute email.
6 7 8 |
# File 'lib/forge/app/models/contact.rb', line 6 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/forge/app/models/contact.rb', line 6 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
6 7 8 |
# File 'lib/forge/app/models/contact.rb', line 6 def phone @phone end |
#subject ⇒ Object
Returns the value of attribute subject.
6 7 8 |
# File 'lib/forge/app/models/contact.rb', line 6 def subject @subject end |
Instance Method Details
#persisted? ⇒ Boolean
21 22 23 |
# File 'lib/forge/app/models/contact.rb', line 21 def persisted? false end |