Class: Accessionable::Submission::Contact

Inherits:
Object
  • Object
show all
Defined in:
app/models/accessionable/submission.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ Contact


96
97
98
99
100
# File 'app/models/accessionable/submission.rb', line 96

def initialize(user)
  @inform_on_error = "#{user.}@#{configatron.default_email_domain}"
  @inform_on_status = inform_on_error
  @name = user.first_name + ' ' + user.last_name
end

Instance Attribute Details

#inform_on_errorObject (readonly)

Returns the value of attribute inform_on_error


95
96
97
# File 'app/models/accessionable/submission.rb', line 95

def inform_on_error
  @inform_on_error
end

#inform_on_statusObject (readonly)

Returns the value of attribute inform_on_status


95
96
97
# File 'app/models/accessionable/submission.rb', line 95

def inform_on_status
  @inform_on_status
end

#nameObject (readonly)

Returns the value of attribute name


95
96
97
# File 'app/models/accessionable/submission.rb', line 95

def name
  @name
end

Instance Method Details

#build(markup) ⇒ Object


102
103
104
105
106
107
108
# File 'app/models/accessionable/submission.rb', line 102

def build(markup)
  markup.CONTACT(
    inform_on_error: inform_on_error,
    inform_on_status: inform_on_status,
    name: name
  )
end