Class: Dorsale::Email

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, Agilibox::ModelI18n, Agilibox::ModelToS
Defined in:
app/models/dorsale/email.rb

Direct Known Subclasses

BillingMachine::Email

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEmail

Returns a new instance of Email.



24
25
26
27
# File 'app/models/dorsale/email.rb', line 24

def initialize(*)
  super
  assign_default_values
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



14
15
16
# File 'app/models/dorsale/email.rb', line 14

def body
  @body
end

#ccObject

Returns the value of attribute cc.



14
15
16
# File 'app/models/dorsale/email.rb', line 14

def cc
  @cc
end

#current_userObject

Returns the value of attribute current_user.



14
15
16
# File 'app/models/dorsale/email.rb', line 14

def current_user
  @current_user
end

#fromObject

Returns the value of attribute from.



14
15
16
# File 'app/models/dorsale/email.rb', line 14

def from
  @from
end

#subjectObject

Returns the value of attribute subject.



14
15
16
# File 'app/models/dorsale/email.rb', line 14

def subject
  @subject
end

#toObject

Returns the value of attribute to.



14
15
16
# File 'app/models/dorsale/email.rb', line 14

def to
  @to
end

Instance Method Details

#attachment_namesObject



29
30
31
# File 'app/models/dorsale/email.rb', line 29

def attachment_names
  attachments.keys.join(", ")
end

#saveObject



33
34
35
# File 'app/models/dorsale/email.rb', line 33

def save
  valid? && deliver_later
end