Class: Aws::EC2::Types::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/awsclean/aws_extensions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#elegible_for_cleanupObject

Returns the value of attribute elegible_for_cleanup


8
9
10
# File 'lib/awsclean/aws_extensions.rb', line 8

def elegible_for_cleanup
  @elegible_for_cleanup
end

#in_useObject

Returns the value of attribute in_use


8
9
10
# File 'lib/awsclean/aws_extensions.rb', line 8

def in_use
  @in_use
end

Instance Method Details

#days_since_creationObject


10
11
12
# File 'lib/awsclean/aws_extensions.rb', line 10

def days_since_creation
  (DateTime.now - DateTime.parse(creation_date)).to_i
end

#stale?(max_age) ⇒ Boolean

Returns:

  • (Boolean)

14
15
16
# File 'lib/awsclean/aws_extensions.rb', line 14

def stale?(max_age)
  days_since_creation >= max_age
end