Class: Granite::Projector
- Inherits:
-
Object
- Object
- Granite::Projector
- Includes:
- ContextProxy, 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
Overview
:nodoc:
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
.action_name ⇒ Object
34 35 36 |
# File 'lib/granite/projector.rb', line 34 def self.action_name @action_name ||= action_class.name.underscore end |
.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 |