Class: Contact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject

Returns the value of attribute content.



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

def content
  @content
end

#emailObject

Returns the value of attribute email.



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

def email
  @email
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



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

def phone
  @phone
end

#subjectObject

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

Returns:

  • (Boolean)


21
22
23
# File 'lib/forge/app/models/contact.rb', line 21

def persisted?
  false
end