Class: Sipity::Forms::CreateOrcidAccountPlaceholderForm

Inherits:
BaseForm
  • Object
show all
Defined in:
app/forms/sipity/forms/create_orcid_account_placeholder_form.rb

Overview

Responsible for the creation of an Account Placeholder

Constant Summary collapse

ORCID_IDENTIFIER_REGEXP =
/\A\w{4}-\w{4}-\w{4}-\w{4}\Z/

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseForm

#persisted?, #submit, #to_key, #to_param

Constructor Details

#initialize(attributes = {}) ⇒ CreateOrcidAccountPlaceholderForm

Returns a new instance of CreateOrcidAccountPlaceholderForm


7
8
9
# File 'app/forms/sipity/forms/create_orcid_account_placeholder_form.rb', line 7

def initialize(attributes = {})
  @identifier, @name = attributes.values_at(:identifier, :name)
end

Instance Attribute Details

#identifierObject

Returns the value of attribute identifier


10
11
12
# File 'app/forms/sipity/forms/create_orcid_account_placeholder_form.rb', line 10

def identifier
  @identifier
end

#nameObject

Returns the value of attribute name


10
11
12
# File 'app/forms/sipity/forms/create_orcid_account_placeholder_form.rb', line 10

def name
  @name
end