Class: Hydra::Config::PermissionsConfig::LeaseConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/hydra/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values = {}, attributes = {prefix:''}) ⇒ LeaseConfig

Returns a new instance of LeaseConfig.



162
163
164
165
166
167
# File 'lib/hydra/config.rb', line 162

def initialize(values = {}, attributes={prefix:''})
  @expiration_date = solr_name("#{attributes[:prefix]}lease_expiration_date", :stored_sortable, type: :date)
  @visibility_during = solr_name("visibility_during_lease", :symbol)
  @visibility_after = solr_name("visibility_after_lease", :symbol)
  @history = solr_name("lease_history", :symbol)
end

Instance Attribute Details

#expiration_dateObject

Returns the value of attribute expiration_date.



161
162
163
# File 'lib/hydra/config.rb', line 161

def expiration_date
  @expiration_date
end

#historyObject

Returns the value of attribute history.



161
162
163
# File 'lib/hydra/config.rb', line 161

def history
  @history
end

#visibility_afterObject

Returns the value of attribute visibility_after.



161
162
163
# File 'lib/hydra/config.rb', line 161

def visibility_after
  @visibility_after
end

#visibility_duringObject

Returns the value of attribute visibility_during.



161
162
163
# File 'lib/hydra/config.rb', line 161

def visibility_during
  @visibility_during
end

Instance Method Details

#solr_name(*args) ⇒ Object



169
170
171
# File 'lib/hydra/config.rb', line 169

def solr_name(*args)
  ActiveFedora.index_field_mapper.solr_name(*args)
end