Class: Ehbrs::Self::Observers::UsedSpace
- Inherits:
-
WithPersistence
- Object
- WithPersistence
- Ehbrs::Self::Observers::UsedSpace
- Defined in:
- lib/ehbrs/self/observers/used_space.rb
Instance Method Summary collapse
Methods inherited from WithPersistence
#changing_value?, #check_current_value
Instance Method Details
#calculate_value ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ehbrs/self/observers/used_space.rb', line 13 def calculate_value env = ::EacRubyUtils::Envs.local env.command('du', '-sb', path.to_s).pipe( env.command('cut', '-f', '-1') ).execute!.strip.to_i end |
#path ⇒ Object
9 10 11 |
# File 'lib/ehbrs/self/observers/used_space.rb', line 9 def path label end |