Class: Accessionable::Submission::Contact
- Inherits:
-
Object
- Object
- Accessionable::Submission::Contact
- Defined in:
- app/models/accessionable/submission.rb
Instance Attribute Summary collapse
-
#inform_on_error ⇒ Object
readonly
Returns the value of attribute inform_on_error.
-
#inform_on_status ⇒ Object
readonly
Returns the value of attribute inform_on_status.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #build(markup) ⇒ Object
-
#initialize(user) ⇒ Contact
constructor
A new instance of Contact.
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.login}@#{configatron.default_email_domain}" @inform_on_status = inform_on_error @name = user.first_name + ' ' + user.last_name end |
Instance Attribute Details
#inform_on_error ⇒ Object (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_status ⇒ Object (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 |
#name ⇒ Object (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 |