Class: Hydra::Config::PermissionsConfig::EmbargoConfig

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:''}) ⇒ EmbargoConfig

Returns a new instance of EmbargoConfig.



148
149
150
151
152
153
# File 'lib/hydra/config.rb', line 148

def initialize(values = {}, attributes={prefix:''})
  @release_date = solr_name("#{attributes[:prefix]}embargo_release_date", :stored_sortable, type: :date)
  @visibility_during = solr_name("visibility_during_embargo", :symbol)
  @visibility_after = solr_name("visibility_after_embargo", :symbol)
  @history = solr_name("embargo_history", :symbol)
end

Instance Attribute Details

#historyObject

Returns the value of attribute history.



147
148
149
# File 'lib/hydra/config.rb', line 147

def history
  @history
end

#release_dateObject

Returns the value of attribute release_date.



147
148
149
# File 'lib/hydra/config.rb', line 147

def release_date
  @release_date
end

#visibility_afterObject

Returns the value of attribute visibility_after.



147
148
149
# File 'lib/hydra/config.rb', line 147

def visibility_after
  @visibility_after
end

#visibility_duringObject

Returns the value of attribute visibility_during.



147
148
149
# File 'lib/hydra/config.rb', line 147

def visibility_during
  @visibility_during
end

Instance Method Details

#solr_name(*args) ⇒ Object



155
156
157
# File 'lib/hydra/config.rb', line 155

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