Class: Ehbrs::Tools::Self::Observers::UsedSpace
Instance Method Summary
collapse
#changing_value?, #check_current_value
Instance Method Details
#calculate_value ⇒ Object
12
13
14
15
16
17
|
# File 'lib/ehbrs/tools/self/observers/used_space.rb', line 12
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
8
9
10
|
# File 'lib/ehbrs/tools/self/observers/used_space.rb', line 8
def path
label
end
|