Skip to content
Browse files

Make version locked? work like you think it should

  • Loading branch information...
1 parent b05eb9f commit ebbfb3c160a0d21ff349699423bec7b685648dbb @simonwistow simonwistow committed
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/fastly/version.rb
View
11 lib/fastly/version.rb
@@ -1,7 +1,7 @@
class Fastly
# An iteration of your configuration
class Version < Base
- attr_accessor :service_id, :number, :name, :active, :locked, :staging, :testing, :deployed, :comment
+ attr_accessor :service_id, :number, :name, :active, :staging, :testing, :deployed, :comment
##
# :attr: service_id
@@ -52,6 +52,15 @@ class Version < Base
#
# a free form comment field
+ # Is this Version locked
+ def locked?
+ return @locked.to_i > 1
+ end
+
+ # Set whether this Version is locked
+ def locked=(is_locked)
+ @locked = is_locked ? "1" : "0"
+ end
# Get the Service object this Version belongs to
def service

0 comments on commit ebbfb3c

Please sign in to comment.
Something went wrong with that request. Please try again.