Class: Betterdocs::Dsl::Controller::ControllerBase
- Inherits:
-
Object
- Object
- Betterdocs::Dsl::Controller::ControllerBase
- Includes:
- Betterdocs::Dsl::Common
- Defined in:
- lib/betterdocs/dsl/controller/controller_base.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #add_to_collector(collector) ⇒ Object
-
#initialize(controller, &block) ⇒ ControllerBase
constructor
A new instance of ControllerBase.
Methods included from Betterdocs::Dsl::Common
Constructor Details
#initialize(controller, &block) ⇒ ControllerBase
Returns a new instance of ControllerBase.
10 11 12 13 14 |
# File 'lib/betterdocs/dsl/controller/controller_base.rb', line 10 def initialize(controller, &block) controller(controller) set_context controller instance_eval(&block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Betterdocs::Dsl::Common
Class Method Details
.inherited(klass) ⇒ Object
6 7 8 |
# File 'lib/betterdocs/dsl/controller/controller_base.rb', line 6 def self.inherited(klass) klass.class_eval { extend Tins::DSLAccessor } end |
Instance Method Details
#add_to_collector(collector) ⇒ Object
18 19 20 |
# File 'lib/betterdocs/dsl/controller/controller_base.rb', line 18 def add_to_collector(collector) raise NotImplementedError, 'add_to_collector needs to be implemented in subclass' end |