Module: Tumugi::Mixin::Listable
- Included in:
- Command::Show, DAG, DAGResultReporter, Task, TaskDefinition
- Defined in:
- lib/tumugi/mixin/listable.rb
Instance Method Summary collapse
Instance Method Details
#list(obj) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/tumugi/mixin/listable.rb', line 4 def list(obj) if obj.nil? [] elsif obj.is_a?(Array) obj elsif obj.is_a?(Hash) obj.map { |k,v| v } else [obj] end end |