lib/fastly/version.rb in fastly-0.95 vs lib/fastly/version.rb in fastly-0.96

- old
+ new

@@ -1,9 +1,9 @@ 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 # The id of the service this belongs to. @@ -50,9 +50,18 @@ ## # :attr: comment # # 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 fetcher.get(Fastly::Service, service_id) end \ No newline at end of file