Class: Aws::EC2::Types::Image
- Inherits:
-
Object
- Object
- Aws::EC2::Types::Image
- Defined in:
- lib/awsclean/aws_extensions.rb
Instance Attribute Summary collapse
-
#elegible_for_cleanup ⇒ Object
Returns the value of attribute elegible_for_cleanup.
-
#in_use ⇒ Object
Returns the value of attribute in_use.
Instance Method Summary collapse
Instance Attribute Details
#elegible_for_cleanup ⇒ Object
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_use ⇒ Object
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_creation ⇒ Object
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
14 15 16 |
# File 'lib/awsclean/aws_extensions.rb', line 14 def stale?(max_age) days_since_creation >= max_age end |