Sha256: 1f0e3d4e555f0b240797555de79bcc17a3314ba44dba8fb31ac4fe50b8af82b4
Contents?: true
Size: 628 Bytes
Versions: 8
Compression:
Stored size: 628 Bytes
Contents
module GitCompound # Task module and factory # module Task extend self def factory(name, type, manifest, &block) case # manifest task when type.nil? || type == :manfiest then task_class = TaskSingle # task for each component defined in manifest when type == :each then task_class = TaskEach # task for all descendant components of manifest when type == :all then task_class = TaskAll else raise GitCompoundError, "Unrecognized task type `#{type}`" end task_class.new(name, manifest, &block) end end end
Version data entries
8 entries across 8 versions & 1 rubygems