Class: Simp::Cli::Config::Item::RsyncTimeout

Inherits:
Simp::Cli::Config::Item show all
Defined in:
lib/simp/cli/config/item/rsync_timeout.rb

Instance Attribute Summary

Attributes inherited from Simp::Cli::Config::Item

#allow_user_apply, #config_items, #description, #die_on_apply_fail, #fact, #fail_on_missing_answer, #key, #next_items_tree, #silent, #skip_apply, #skip_query, #skip_yaml, #value

Instance Method Summary collapse

Methods inherited from Simp::Cli::Config::Item

#apply, #default_value, #highline_question_type, #next_items, #not_valid_message, #print_banner, #print_summary, #puppet_value, #query, #query_ask, #query_extras, #query_status, #safe_apply, #say_blue, #say_green, #say_red, #say_yellow, #to_yaml_s

Constructor Details

#initializeRsyncTimeout



9
10
11
12
13
14
# File 'lib/simp/cli/config/item/rsync_timeout.rb', line 9

def initialize
  super
  @key         = 'rsync::timeout'
  @description = 'maximum rsync timeout in seconds.  0 = no timeout'
  @skip_query  = true
end

Instance Method Details

#os_valueObject



16
# File 'lib/simp/cli/config/item/rsync_timeout.rb', line 16

def os_value; nil; end


22
23
24
# File 'lib/simp/cli/config/item/rsync_timeout.rb', line 22

def recommended_value
  '1'
end

#validate(x) ⇒ Object



18
19
20
# File 'lib/simp/cli/config/item/rsync_timeout.rb', line 18

def validate( x )
  x.to_s =~ %r{^\d+} ? true : false
end