Class: Contact
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/cv/contact.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #deliver ⇒ Object
-
#initialize(args = {}) ⇒ Contact
constructor
A new instance of Contact.
Constructor Details
#initialize(args = {}) ⇒ Contact
Returns a new instance of Contact.
9 10 11 |
# File 'lib/cv/contact.rb', line 9 def initialize(args = {}) args.each { |key, value| send("#{key}=", value) } end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
4 5 6 |
# File 'lib/cv/contact.rb', line 4 def email @email end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/cv/contact.rb', line 4 def @message end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/cv/contact.rb', line 4 def name @name end |
Instance Method Details
#deliver ⇒ Object
13 14 15 16 17 18 |
# File 'lib/cv/contact.rb', line 13 def deliver Mail.deliver :to => '[email protected]', :from => email, :subject => 'Contact', :body => end |