Sha256: 7f905e6b46b3c72909b949a6eab17aa6918474f9f30aeb2104a1184be922c814
Contents?: true
Size: 744 Bytes
Versions: 30
Compression:
Stored size: 744 Bytes
Contents
module RakeFactory module Namespaceable def self.prepended(base) super(base) base.class_eval do parameter(:namespace, transform: lambda { |name| name = name.to_s if name.kind_of?(Symbol) name = name.to_str if name.respond_to?(:to_str) unless name.kind_of?(String) || name.nil? raise ArgumentError, "Expected a String or Symbol for a namespace name" end name }) end end def around_define(application) if namespace application.in_namespace(namespace) do super(application) end else super(application) end end end end
Version data entries
30 entries across 30 versions & 1 rubygems