Skip to content

Commit

Permalink
Simplify getters
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmb committed Oct 27, 2017
1 parent 2c27c5e commit 2627ec1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/kubernetes-deploy/discoverable_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class DiscoverableResource < KubernetesResource

class << self
attr_accessor :version, :group, :type
attr_reader :timeout
end

STATUS_FIELD_ANNOTATION = 'kubernetes-deploy.shopify.io/status-field'
Expand All @@ -31,18 +32,11 @@ def self.child_classes
end

def self.prunable?
return @prunable if defined?(@prunable)
false
@prunable
end

def self.predeploy?
return @predeploy if defined?(@predeploy)
false
end

def self.timeout
return @timeout if defined?(@timeout)
super
@predeploy
end

def self.identity
Expand Down

0 comments on commit 2627ec1

Please sign in to comment.