Class: ContributorAgreement
- Inherits:
-
Object
- Object
- ContributorAgreement
- Defined in:
- app/models/contributor_agreement.rb
Instance Attribute Summary collapse
-
#curation_concern ⇒ Object
readonly
Returns the value of attribute curation_concern.
-
#param_value ⇒ Object
readonly
Returns the value of attribute param_value.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #acceptance_value ⇒ Object
-
#initialize(curation_concern, user, params) ⇒ ContributorAgreement
constructor
A new instance of ContributorAgreement.
- #is_being_accepted? ⇒ Boolean
- #param_key ⇒ Object
Constructor Details
#initialize(curation_concern, user, params) ⇒ ContributorAgreement
Returns a new instance of ContributorAgreement.
3 4 5 6 7 |
# File 'app/models/contributor_agreement.rb', line 3 def initialize(curation_concern, user, params) @curation_concern = curation_concern @user = user @param_value = params[param_key.to_sym] || params[param_key.to_s] end |
Instance Attribute Details
#curation_concern ⇒ Object (readonly)
Returns the value of attribute curation_concern.
2 3 4 |
# File 'app/models/contributor_agreement.rb', line 2 def curation_concern @curation_concern end |
#param_value ⇒ Object (readonly)
Returns the value of attribute param_value.
16 17 18 |
# File 'app/models/contributor_agreement.rb', line 16 def param_value @param_value end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
2 3 4 |
# File 'app/models/contributor_agreement.rb', line 2 def user @user end |
Instance Method Details
#acceptance_value ⇒ Object
9 10 11 |
# File 'app/models/contributor_agreement.rb', line 9 def acceptance_value 'accept' end |
#is_being_accepted? ⇒ Boolean
18 19 20 |
# File 'app/models/contributor_agreement.rb', line 18 def is_being_accepted? param_value == acceptance_value end |
#param_key ⇒ Object
13 14 15 |
# File 'app/models/contributor_agreement.rb', line 13 def param_key :accept_contributor_agreement end |