Class: Sipity::Decorators::Recommendations::CitationRecommendation

Inherits:
Base
  • Object
show all
Defined in:
app/decorators/sipity/decorators/recommendations/citation_recommendation.rb

Overview

Container for the Citation Recommendation

Instance Attribute Summary

Attributes inherited from Base

#helper, #repository, #sip

Instance Method Summary collapse

Methods inherited from Base

#default_helper, #default_repository, #human_attribute_name, #human_name, #human_status, #initialize, #translation_scope

Constructor Details

This class inherits a constructor from Sipity::Decorators::Recommendations::Base

Instance Method Details

#citation_already_assigned?Boolean (private)

Returns:

  • (Boolean)

18
19
20
# File 'app/decorators/sipity/decorators/recommendations/citation_recommendation.rb', line 18

def citation_already_assigned?
  repository.citation_already_assigned?(sip)
end

#path_to_recommendationObject


12
13
14
# File 'app/decorators/sipity/decorators/recommendations/citation_recommendation.rb', line 12

def path_to_recommendation
  helper.sip_citation_path(sip)
end

#stateObject Also known as: status


6
7
8
9
# File 'app/decorators/sipity/decorators/recommendations/citation_recommendation.rb', line 6

def state
  return :citation_already_assigned if citation_already_assigned?
  return :citation_not_assigned
end