Sha256: 8c39b6ee8fd0b1827351328083491d8aa2827f8900435d4a1de8b8ae622b1a1c
Contents?: true
Size: 761 Bytes
Versions: 16
Compression:
Stored size: 761 Bytes
Contents
module Eco module Common class MetaThor class CommandGroup attr_reader :units def initialize(args) args = (args && [args].flatten) || [] #pp "CommandGroup split args: #{Pipe.split(args)}" @units = Pipe.split(args).each_with_index.map do |arguments, i| CommandUnit.new(args: arguments, group: self, index: i) end @units = units end def print @units.map do |command| pp command.args end end def [](value) @units[value] end def map @units.map do |unit| yield(unit) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems