Class: Hyrax::Name
- Inherits:
-
ActiveModel::Name
- Object
- ActiveModel::Name
- Hyrax::Name
- Defined in:
- lib/hyrax/name.rb
Overview
Direct Known Subclasses
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Expose the underlying klass which can be helpful when consider that we have the Hyrax::ValkyrieLazyMigration.
Instance Method Summary collapse
-
#initialize(klass, namespace = nil, name = nil) ⇒ Name
constructor
A new instance of Name.
Constructor Details
#initialize(klass, namespace = nil, name = nil) ⇒ Name
Returns a new instance of Name.
14 15 16 17 18 19 |
# File 'lib/hyrax/name.rb', line 14 def initialize(klass, namespace = nil, name = nil) super @route_key = "hyrax_#{ActiveSupport::Inflector.pluralize(@param_key)}" @singular_route_key = ActiveSupport::Inflector.singularize(@route_key) @route_key += "_index" if @plural == @singular end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Expose the underlying klass which can be helpful when consider that we have the Hyrax::ValkyrieLazyMigration
24 25 26 |
# File 'lib/hyrax/name.rb', line 24 def klass @klass end |