Class: Bashly::Script::EnvironmentVariable
- Includes:
- Introspection::Visibility
- Defined in:
- lib/bashly/script/environment_variable.rb
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Renderable
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Introspection::Visibility
Methods inherited from Base
#help, #initialize, #method_missing, #optional, #respond_to_missing?, #summary
Methods included from Renderable
#load_user_file, #render, #strings, #user_file_exist?, #user_file_path, #view_marker
Constructor Details
This class inherits a constructor from Bashly::Script::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bashly::Script::Base
Class Method Details
.option_keys ⇒ Object
7 8 9 10 11 |
# File 'lib/bashly/script/environment_variable.rb', line 7 def option_keys @option_keys ||= %i[ allowed default help name required private validate ] end |
Instance Method Details
#usage_string(extended: false) ⇒ Object
14 15 16 17 18 |
# File 'lib/bashly/script/environment_variable.rb', line 14 def usage_string(extended: false) result = [name.upcase] result << strings[:required] if required && extended result.join ' ' end |