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

Returns a new instance of Contact.



84
85
86
87
88
# File 'app/models/accessionable/submission.rb', line 84

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.



82
83
84
# File 'app/models/accessionable/submission.rb', line 82

def inform_on_error
  @inform_on_error
end

#inform_on_statusObject (readonly)

Returns the value of attribute inform_on_status.



82
83
84
# File 'app/models/accessionable/submission.rb', line 82

def inform_on_status
  @inform_on_status
end

#nameObject (readonly)

Returns the value of attribute name.



82
83
84
# File 'app/models/accessionable/submission.rb', line 82

def name
  @name
end

Instance Method Details

#build(markup) ⇒ Object



90
91
92
# File 'app/models/accessionable/submission.rb', line 90

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