Class: CheckDisk::Block
Overview
Interface for checking Inodes.
Instance Method Summary collapse
- #available ⇒ Object
-
#critical? ⇒ TrueClass, FalseClass
Boolean method for determining if we are ‘critical?’.
-
#initialize(config) ⇒ Block
constructor
A new instance of Block.
- #message ⇒ Object
- #percent_used ⇒ Object
- #total ⇒ Object
- #used ⇒ Object
-
#warning? ⇒ TrueClass, FalseClass
Boolean method for determining if we are ‘warning?’.
Constructor Details
#initialize(config) ⇒ Block
Returns a new instance of Block.
6 7 8 |
# File 'lib/check_disk/blocks.rb', line 6 def initialize(config) super end |
Instance Method Details
#available ⇒ Object
14 15 16 |
# File 'lib/check_disk/blocks.rb', line 14 def available blocks_available end |
#critical? ⇒ TrueClass, FalseClass
Boolean method for determining if we are ‘critical?’
34 35 36 |
# File 'lib/check_disk/blocks.rb', line 34 def critical? percent_of_blocks_used > critical end |
#message ⇒ Object
38 39 40 41 |
# File 'lib/check_disk/blocks.rb', line 38 def "#{ percent_of_blocks_used }% of blocks used. " \ "path: #{ path } total: #{ total } available: #{ available }" end |
#percent_used ⇒ Object
22 23 24 |
# File 'lib/check_disk/blocks.rb', line 22 def percent_used percent_of_blocks_used end |
#total ⇒ Object
10 11 12 |
# File 'lib/check_disk/blocks.rb', line 10 def total blocks_total end |
#used ⇒ Object
18 19 20 |
# File 'lib/check_disk/blocks.rb', line 18 def used blocks_used end |
#warning? ⇒ TrueClass, FalseClass
Boolean method for determining if we are ‘warning?’
28 29 30 |
# File 'lib/check_disk/blocks.rb', line 28 def warning? percent_of_blocks_used > warning end |