Class: Build
- Inherits:
-
Object
- Object
- Build
- Defined in:
- lib/build.rb
Instance Attribute Summary collapse
-
#build ⇒ Object
Returns the value of attribute build.
-
#check_build ⇒ Object
Returns the value of attribute check_build.
Instance Method Summary collapse
- #check ⇒ Object
- #create ⇒ Object
-
#initialize(build = nil) ⇒ Build
constructor
A new instance of Build.
Constructor Details
#initialize(build = nil) ⇒ Build
Returns a new instance of Build.
2 3 4 5 |
# File 'lib/build.rb', line 2 def initialize(build=nil) @build = build @check_build = false end |
Instance Attribute Details
#build ⇒ Object
Returns the value of attribute build.
7 8 9 |
# File 'lib/build.rb', line 7 def build @build end |
#check_build ⇒ Object
Returns the value of attribute check_build.
7 8 9 |
# File 'lib/build.rb', line 7 def check_build @check_build end |
Instance Method Details
#check ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/build.rb', line 10 def check puts "checking if build already exists" begin @build = $server.call("Build.check_build", @build["name"], @build["product"]) rescue return @build end end |
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/build.rb', line 19 def create if @build["name"].nil? puts "Build name not set" return false elsif @build["product"].nil? puts "Build product not set" return false end puts @check_build if @check_build == true self.check end @build = $server.call("Build.create", @build) return @build end |