Class: Granite::Projector
- Inherits:
-
Object
- Object
- Granite::Projector
- Includes:
- PerformerProxy, ControllerActions, Helpers, Translations
- Defined in:
- lib/granite/projector.rb,
lib/granite/projector/error.rb,
lib/granite/projector/helpers.rb,
lib/granite/projector/translations.rb,
lib/granite/projector/controller_actions.rb,
lib/granite/projector/translations/helper.rb,
lib/granite/projector/translations/view_helper.rb
Defined Under Namespace
Modules: ControllerActions, Helpers, Translations Classes: ActionNotMountedError, Error
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Projector
constructor
A new instance of Projector.
Methods included from Translations
Methods included from Helpers
#action_path, #action_url, #view_context
Constructor Details
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
16 17 18 |
# File 'lib/granite/projector.rb', line 16 def action @action end |
Class Method Details
.controller_class ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/granite/projector.rb', line 18 def self.controller_class return Granite::Controller unless superclass.respond_to?(:controller_class) @controller_class ||= Class.new(superclass.controller_class).tap do |klass| klass.projector_class = self end end |
.projector_name ⇒ Object
30 31 32 |
# File 'lib/granite/projector.rb', line 30 def self.projector_name @projector_name ||= name.demodulize.remove(/Projector$/).underscore end |
.projector_path ⇒ Object
26 27 28 |
# File 'lib/granite/projector.rb', line 26 def self.projector_path @projector_path ||= name.remove(/Projector$/).underscore end |