Sha256: b1e7799d6f47c13ec56d7bd332b94f333b52c1d426e7c81571f1bbbe97ba80b9

Contents?: true

Size: 587 Bytes

Versions: 12

Compression:

Stored size: 587 Bytes

Contents

module MyHelp
  class Init
    def initialize(config)
      @config = config
    end

    def help_dir_exist?
      File.exist?(@config[:local_help_dir])
    end

    def check_conf_exist
      File.exist?(@config[:conf_file])
    end

    def mk_help_dir
      FileUtils.mkdir(@config[:local_help_dir])
    end

    def cp_templates
      target_dir = @config[:local_help_dir]
      src_dir = @config[:template_dir]
      ext = @config[:ext]
      Dir.glob(File.join(src_dir, "*#{ext}")).each do |file|
        FileUtils.cp(file, target_dir, verbose: false)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
my_help-1.2.9 lib/my_help/init.rb
my_help-1.2.8 lib/my_help/init.rb
my_help-1.2.7 lib/my_help/init.rb
my_help-1.2.6 lib/my_help/init.rb
my_help-1.2.5 lib/my_help/init.rb
my_help-1.2.4p1 lib/my_help/init.rb
my_help-1.2.4 lib/my_help/init.rb
my_help-1.2.3 lib/my_help/init.rb
my_help-1.2.2 lib/my_help/init.rb
my_help-1.2 lib/my_help/init.rb
my_help-1.1a lib/my_help/init.rb
my_help-1.1 lib/my_help/init.rb