Class: Rolemodel::Utility::ArgumentSanitizer
- Inherits:
-
Object
- Object
- Rolemodel::Utility::ArgumentSanitizer
- Defined in:
- lib/rolemodel/utility/task_tools.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ ArgumentSanitizer
constructor
A new instance of ArgumentSanitizer.
- #to_h ⇒ Object
Constructor Details
#initialize(args) ⇒ ArgumentSanitizer
Returns a new instance of ArgumentSanitizer.
60 61 62 |
# File 'lib/rolemodel/utility/task_tools.rb', line 60 def initialize(args) @args = args.to_h end |
Instance Method Details
#to_h ⇒ Object
64 65 66 |
# File 'lib/rolemodel/utility/task_tools.rb', line 64 def to_h @args.transform_values { it.to_s.strip.match?('_') ? nil : it.to_s.strip }.compact end |