Class: Contact::Message

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion, ActiveModel::Validations
Defined in:
app/models/contact/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject

Returns the value of attribute content.



7
8
9
# File 'app/models/contact/message.rb', line 7

def content
  @content
end

#emailObject

Returns the value of attribute email.



7
8
9
# File 'app/models/contact/message.rb', line 7

def email
  @email
end

#nameObject

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

Returns:

  • (Boolean)


19
20
21
# File 'app/models/contact/message.rb', line 19

def persisted?
  false
end