Class: Automux::Controller::Base
- Inherits:
-
Object
- Object
- Automux::Controller::Base
- Extended by:
- Support::Filters
- Includes:
- Support::Rendering
- Defined in:
- lib/automux/controller/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #check_blueprint ⇒ Object
-
#initialize(params = {}) ⇒ Base
constructor
A new instance of Base.
- #notify_error(message) ⇒ Object
Methods included from Support::Filters
after_inherited, before_filter, inherited
Methods included from Support::Rendering
Constructor Details
#initialize(params = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/automux/controller/base.rb', line 9 def initialize(params = {}) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/automux/controller/base.rb', line 7 def params @params end |
Instance Method Details
#check_blueprint ⇒ Object
17 18 19 |
# File 'lib/automux/controller/base.rb', line 17 def check_blueprint notify_error "Unable to find blueprint named #{ params[:blueprint_name] }.yml" if @blueprint.nil? end |
#notify_error(message) ⇒ Object
13 14 15 |
# File 'lib/automux/controller/base.rb', line 13 def notify_error() Automux::Controller::Messages.new(message: ).error end |