Class: Parts::Base
- Inherits:
-
AbstractController::Base
- Object
- AbstractController::Base
- Parts::Base
- Includes:
- AbstractController::Callbacks, AbstractController::Layouts, AbstractController::Rendering, AbstractController::Translation, ActionController::Helpers, ActionController::ImplicitRender, DefaultLayout, Helpers
- Defined in:
- lib/parts/base.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(controller, params) ⇒ Base
constructor
A new instance of Base.
Methods included from Helpers
Methods included from DefaultLayout
Constructor Details
#initialize(controller, params) ⇒ Base
Returns a new instance of Base.
16 17 18 19 20 21 |
# File 'lib/parts/base.rb', line 16 def initialize(controller, params) @controller = controller @params = controller.params.dup @params.merge!(params) unless params.empty? self.formats = controller.formats end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
6 7 8 |
# File 'lib/parts/base.rb', line 6 def controller @controller end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'lib/parts/base.rb', line 6 def params @params end |
Class Method Details
.inherited(klass) ⇒ Object
28 29 30 31 |
# File 'lib/parts/base.rb', line 28 def self.inherited(klass) super klass.helper :all end |