Class: Worthwhile::ContributorAgreement
- Inherits:
-
Object
- Object
- Worthwhile::ContributorAgreement
- Defined in:
- app/models/worthwhile/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.
4 5 6 7 8 |
# File 'app/models/worthwhile/contributor_agreement.rb', line 4 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.
3 4 5 |
# File 'app/models/worthwhile/contributor_agreement.rb', line 3 def curation_concern @curation_concern end |
#param_value ⇒ Object (readonly)
Returns the value of attribute param_value.
17 18 19 |
# File 'app/models/worthwhile/contributor_agreement.rb', line 17 def param_value @param_value end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'app/models/worthwhile/contributor_agreement.rb', line 3 def user @user end |
Instance Method Details
#acceptance_value ⇒ Object
10 11 12 |
# File 'app/models/worthwhile/contributor_agreement.rb', line 10 def acceptance_value 'accept' end |
#is_being_accepted? ⇒ Boolean
19 20 21 |
# File 'app/models/worthwhile/contributor_agreement.rb', line 19 def is_being_accepted? param_value == acceptance_value end |
#param_key ⇒ Object
14 15 16 |
# File 'app/models/worthwhile/contributor_agreement.rb', line 14 def param_key :accept_contributor_agreement end |