Class: Contact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject

Returns the value of attribute body.



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

def body
  @body
end

#emailObject

Returns the value of attribute email.



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

def email
  @email
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#subjectObject

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

Returns:

  • (Boolean)


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

def persisted?
  false
end