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