Class: Sipity::Forms::AssignACitationForm

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

Overview

Responsible for capturing and validating information for citation creation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseForm

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

Constructor Details

#initialize(attributes = {}) ⇒ AssignACitationForm

Returns a new instance of AssignACitationForm


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

def initialize(attributes = {})
  @sip = attributes.fetch(:sip)
  @type, @citation = attributes.values_at(:type, :citation)
end

Instance Attribute Details

#citationObject

Returns the value of attribute citation


11
12
13
# File 'app/forms/sipity/forms/assign_a_citation_form.rb', line 11

def citation
  @citation
end

#sipObject (readonly)

Returns the value of attribute sip


12
13
14
# File 'app/forms/sipity/forms/assign_a_citation_form.rb', line 12

def sip
  @sip
end

#typeObject

Returns the value of attribute type


11
12
13
# File 'app/forms/sipity/forms/assign_a_citation_form.rb', line 11

def type
  @type
end