From 9db0c31f5656d1b689fd6261079730366f15591c Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sat, 7 Jul 2018 12:45:35 +0200 Subject: use convenience methods in models * use convenience methods in models for legibility * disable Style/SymbolProc in rubocop * introduce cut_both instead of cut_head.cut_tail chain * document cut_both convenience method --- lib/oxidized/model/cumulus.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/model/cumulus.rb') diff --git a/lib/oxidized/model/cumulus.rb b/lib/oxidized/model/cumulus.rb index f53ca73..c8e1707 100644 --- a/lib/oxidized/model/cumulus.rb +++ b/lib/oxidized/model/cumulus.rb @@ -8,7 +8,7 @@ class Cumulus < Oxidized::Model end cmd :all do |cfg| - cfg.each_line.to_a[1..-2].join + cfg.cut_both end # show the persistent configuration -- cgit v1.2.1