Class: Baps::Definition
- Inherits:
-
Object
- Object
- Baps::Definition
- Defined in:
- lib/baps/definition.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #execute ⇒ Object
- #executed? ⇒ Boolean
-
#initialize(path) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(path) ⇒ Definition
Returns a new instance of Definition.
5 6 7 8 |
# File 'lib/baps/definition.rb', line 5 def initialize(path) @path = path instance_eval(File.read(@path), @path) end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/baps/definition.rb', line 3 def path @path end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 |
# File 'lib/baps/definition.rb', line 10 def execute puts "Executing #{@path}" deb.create end |
#executed? ⇒ Boolean
15 16 17 |
# File 'lib/baps/definition.rb', line 15 def executed? deb.already_exist? end |