Class: Automux::Core::Blueprint
- Defined in:
- lib/automux/core/blueprint.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#source_blueprint ⇒ Object
readonly
Returns the value of attribute source_blueprint.
Class Method Summary collapse
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(path) ⇒ Blueprint
constructor
A new instance of Blueprint.
- #read ⇒ Object
- #source=(blueprint) ⇒ Object
Methods included from Support::CustomAccessors
Constructor Details
#initialize(path) ⇒ Blueprint
Returns a new instance of Blueprint.
6 7 8 9 |
# File 'lib/automux/core/blueprint.rb', line 6 def initialize(path) @name = File.basename(path, '.yml') @path = path end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/automux/core/blueprint.rb', line 4 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/automux/core/blueprint.rb', line 4 def path @path end |
#source_blueprint ⇒ Object (readonly)
Returns the value of attribute source_blueprint.
4 5 6 |
# File 'lib/automux/core/blueprint.rb', line 4 def source_blueprint @source_blueprint end |
Class Method Details
Instance Method Details
#get_binding ⇒ Object
15 16 17 |
# File 'lib/automux/core/blueprint.rb', line 15 def get_binding binding end |
#read ⇒ Object
11 12 13 |
# File 'lib/automux/core/blueprint.rb', line 11 def read Automux::Library::YamlParser.load_file(path) end |
#source=(blueprint) ⇒ Object
19 20 21 |
# File 'lib/automux/core/blueprint.rb', line 19 def source=(blueprint) @source_blueprint = blueprint end |