lib/command_kit/env/home.rb in command_kit-0.1.0.rc1 vs lib/command_kit/env/home.rb in command_kit-0.1.0

- old
+ new

@@ -12,10 +12,13 @@ # * `HOME` - The absolute path to the user's home directory. # module Home include Env + # + # @api private + # module ModuleMethods # # Extends {ClassMethods} or {ModuleMethods}, depending on whether # {Env::Home} is being included into a class or a module.. # @@ -42,25 +45,31 @@ # # The default home directory. # # @return [String] # + # @api semipublic + # def home_dir Gem.user_home end end # The home directory. # # @return [String] + # + # @api public attr_reader :home_dir # # Initializes {#home_dir} to either `env['HOME']` or # {ClassMethods#home_dir self.class.home_dir}. # # @param [Hash{Symbol => Object}] kwargs # Additional keyword arguments. + # + # @api public # def initialize(**kwargs) super(**kwargs) @home_dir = env.fetch('HOME') { self.class.home_dir }