Class: Geoblacklight::Relation::RelationResponse
- Inherits:
-
Object
- Object
- Geoblacklight::Relation::RelationResponse
- Defined in:
- lib/geoblacklight/relation/relation_response.rb
Instance Attribute Summary collapse
-
#link_id ⇒ Object
readonly
Returns the value of attribute link_id.
-
#search_id ⇒ Object
readonly
Returns the value of attribute search_id.
Instance Method Summary collapse
-
#initialize(id, repository) ⇒ RelationResponse
constructor
A new instance of RelationResponse.
- #method_missing(method, *args, &block) ⇒ Object
- #respond_to_missing?(method_name, *args) ⇒ Boolean
Constructor Details
#initialize(id, repository) ⇒ RelationResponse
Returns a new instance of RelationResponse.
7 8 9 10 11 12 13 14 |
# File 'lib/geoblacklight/relation/relation_response.rb', line 7 def initialize(id, repository) Geoblacklight.deprecation.warn( "GeoBlacklight 6 renames the Geoblacklight::Relation namespace to Geoblacklight::Relations, and RelationController to RelationsController, so update any reference to Geoblacklight::Relation::RelationResponse" ) @link_id = id @search_id = RSolr.solr_escape(id) @repository = repository end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/geoblacklight/relation/relation_response.rb', line 16 def method_missing(method, *args, &block) if Settings.RELATIONSHIPS_SHOWN.key?(method) field = Settings.RELATIONSHIPS_SHOWN[method].field query_type = query_type(Settings.RELATIONSHIPS_SHOWN[method]) @results = Geoblacklight.deprecation.silence { query_type.new(@search_id, field, @repository) }.results else super end end |
Instance Attribute Details
#link_id ⇒ Object (readonly)
Returns the value of attribute link_id.
6 7 8 |
# File 'lib/geoblacklight/relation/relation_response.rb', line 6 def link_id @link_id end |
#search_id ⇒ Object (readonly)
Returns the value of attribute search_id.
6 7 8 |
# File 'lib/geoblacklight/relation/relation_response.rb', line 6 def search_id @search_id end |
Instance Method Details
#respond_to_missing?(method_name, *args) ⇒ Boolean
26 27 28 |
# File 'lib/geoblacklight/relation/relation_response.rb', line 26 def respond_to_missing?(method_name, *args) Settings.RELATIONSHIPS_SHOWN.key?(method_name) or super end |