Module: Fylla::Thor::Arguments
- Defined in:
- lib/fylla/thor/extensions/comma_array_extension.rb
Instance Method Summary collapse
Instance Method Details
#parse_array(_name) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fylla/thor/extensions/comma_array_extension.rb', line 9 def parse_array(_name) return shift if peek.is_a?(Array) array = [] if peek.include? "," array.push(*shift.split(",")) else array << shift while current_is_value? end array end |