lib/hanami/assets.rb in hanami-assets-0.2.1 vs lib/hanami/assets.rb in hanami-assets-0.3.0
- old
+ new
@@ -91,26 +91,26 @@
# require 'hanami/assets'
#
# Hanami::Assets.sources << '/path/to/emberjs/assets'
def self.sources
synchronize do
- @@sources ||= Config::GlobalSources.new
+ @@sources ||= Config::GlobalSources.new # rubocop:disable Style/ClassVars
end
end
# Duplicate the framework and generate modules for the target application
#
- # @param mod [Module] the Ruby namespace of the application
+ # @param _mod [Module] the Ruby namespace of the application
# @param blk [Proc] an optional block to configure the framework
#
# @return [Module] a copy of Hanami::Assets
#
- # @since 0.1.0
+ # @since 0.1.0
#
# @see Hanami::Assets#dupe
# @see Hanami::Assets::Configuration
- def self.duplicate(mod, &blk)
+ def self.duplicate(_mod, &blk)
dupe.tap do |duplicated|
duplicated.configure(&blk) if block_given?
duplicates << duplicated
end
end
@@ -141,18 +141,20 @@
#
# @see Hanami::Assets#duplicate
# @see Hanami::Assets#dupe
def self.duplicates
synchronize do
- @@duplicates ||= Array.new
+ @@duplicates ||= [] # rubocop:disable Style/ClassVars
end
end
- private
+ class << self
+ private
- # @since 0.1.0
- # @api private
- def self.synchronize(&blk)
- Mutex.new.synchronize(&blk)
+ # @since 0.1.0
+ # @api private
+ def synchronize(&blk)
+ Mutex.new.synchronize(&blk)
+ end
end
end
end