lib/sinclair/config/methods_builder.rb in sinclair-1.4.1 vs lib/sinclair/config/methods_builder.rb in sinclair-1.4.2
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
class Sinclair
class Config
# @api private
+ # @author darthjee
#
# Class responsible for adding method to configuration
# classes
class MethodsBuilder < Sinclair
# Instantiate method builder and build the methods
@@ -25,11 +26,11 @@
# @param klass [Class] class inheriting from {Sinclair::Config}
# that will receive the methods
# @overload initialize(klass, *names, default)
# @param names [Array<Symbol,String>] List of configuration names
# to be added
- # @param default [Hash] Configurations that will receive a default
+ # @param default [Hash] Configurations that will receive a default value
# value when not configured
def initialize(klass, *names)
super(klass)
@names = names
@@ -67,9 +68,22 @@
config_hash.keys
end
private
+ # @method names
+ # @private
+ #
+ # List of configuration names
+ #
+ # @return [Array<Symbol,String>]
+
+ # @method defaults
+ # @private
+ #
+ # Configurations that will receive a default value
+ #
+ # @return [Hash]
attr_reader :names, :defaults
# @private
#
# Builds the final config hash