Class: Simp::Cli::Config::Item::DHCP
- Inherits:
-
Simp::Cli::Config::Item
- Object
- Simp::Cli::Config::Item
- Simp::Cli::Config::Item::DHCP
- Defined in:
- lib/simp/cli/config/item/network_dhcp.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
-
#initialize ⇒ DHCP
constructor
A new instance of DHCP.
- #not_valid_message ⇒ Object
- #recommended_value ⇒ Object
- #validate(x) ⇒ Object
Methods inherited from Simp::Cli::Config::Item
#apply, #default_value, #highline_question_type, #next_items, #os_value, #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
#initialize ⇒ DHCP
Returns a new instance of DHCP.
9 10 11 12 13 |
# File 'lib/simp/cli/config/item/network_dhcp.rb', line 9 def initialize super @key = 'dhcp' @description = %q{Whether or not to use DHCP to set up your network ("static" or "dhcp")} end |
Instance Method Details
#not_valid_message ⇒ Object
23 24 25 |
# File 'lib/simp/cli/config/item/network_dhcp.rb', line 23 def 'Valid answers are "static" or "dhcp"' end |
#recommended_value ⇒ Object
15 16 17 |
# File 'lib/simp/cli/config/item/network_dhcp.rb', line 15 def recommended_value 'static' # a puppet master is always recommended to be static. end |
#validate(x) ⇒ Object
19 20 21 |
# File 'lib/simp/cli/config/item/network_dhcp.rb', line 19 def validate( x ) return ['dhcp', 'static' ].include?( x.to_s.downcase ) end |