Class: Baps::Definition

Inherits:
Object
  • Object
show all
Defined in:
lib/baps/definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/baps/definition.rb', line 3

def path
  @path
end

Instance Method Details

#executeObject



10
11
12
13
# File 'lib/baps/definition.rb', line 10

def execute
  puts "Executing #{@path}"
  deb.create
end

#executed?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/baps/definition.rb', line 15

def executed?
  deb.already_exist?
end