Class: Automux::Controller::Blueprints
- Defined in:
- lib/automux/controller/blueprints.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#copy ⇒ Object
(also: #cp)
$ automux blueprint copy source destination.
-
#create ⇒ Object
This copies the content from default.yml and opens the new file using $EDITOR $ automux blueprint create new_blueprint_name.
-
#delete ⇒ Object
(also: #rm)
$ automux blueprint delete some_blueprint.
-
#edit ⇒ Object
blueprint_name.yml will be searched under $HOME/.automux/blueprints $ automux blueprint edit blueprint_name.
- #index ⇒ Object (also: #list)
Methods inherited from Base
#check_blueprint, #initialize, #notify_error
Methods included from Support::Filters
#after_inherited, #before_filter, #inherited
Methods included from Support::Rendering
Constructor Details
This class inherits a constructor from Automux::Controller::Base
Instance Method Details
#copy ⇒ Object Also known as: cp
$ automux blueprint copy source destination
24 25 26 27 28 29 |
# File 'lib/automux/controller/blueprints.rb', line 24 def copy clone_blueprint = Automux::Core::Blueprint.build_by_name(params[:clone_name]) clone_blueprint.source = @blueprint @binding = clone_blueprint.get_binding render 'copy' end |
#create ⇒ Object
This copies the content from default.yml and opens the new file using $EDITOR $ automux blueprint create new_blueprint_name
16 17 18 19 20 21 |
# File 'lib/automux/controller/blueprints.rb', line 16 def create blueprint = Automux::Core::Blueprint.build_by_name(params[:blueprint_name]) blueprint.source = Automux::Cache::Blueprint.find_by_name('default') @binding = blueprint.get_binding render 'create' end |
#delete ⇒ Object Also known as: rm
$ automux blueprint delete some_blueprint
33 34 35 36 |
# File 'lib/automux/controller/blueprints.rb', line 33 def delete @binding = @blueprint.get_binding render 'delete' end |
#edit ⇒ Object
blueprint_name.yml will be searched under $HOME/.automux/blueprints $ automux blueprint edit blueprint_name
9 10 11 12 |
# File 'lib/automux/controller/blueprints.rb', line 9 def edit @binding = @blueprint.get_binding render 'edit' end |
#index ⇒ Object Also known as: list
39 40 41 |
# File 'lib/automux/controller/blueprints.rb', line 39 def index render 'index' end |