Code Duplication    Length = 9-10 lines in 2 locations

lib/publican_creators/prepare.rb 2 locations

@@ 72-81 (lines=10) @@
69
  # @param [String] articles_dir_private contains the path to your private
70
  #                 articles_dir
71
  # @param [String] homework_dir_private contains the path to your homework dir.
72
  def self.targetdir_private(homework, articles_dir_private,
73
      homework_dir_private)
74
    home = Dir.home
75
    if homework == 'FALSE'
76
      articles_dir = "#{home}/#{articles_dir_private}"
77
    else
78
      articles_dir = "#{home}/#{homework_dir_private}"
79
    end
80
    return articles_dir
81
  end
82
end
83
@@ 56-64 (lines=9) @@
53
  # @param [String] articles_dir_bus represents the directory for your articles
54
  # @param [String] report contains a true or false. There you can set if the
55
  #                 new Publication is a Report or not.
56
  def self.targetdir_work(report, reports_dir_business, articles_dir_bus)
57
    home = Dir.home
58
    if report == 'TRUE'
59
      articles_dir = "#{home}/#{reports_dir_business}"
60
    else
61
      articles_dir = "#{home}/#{articles_dir_bus}"
62
    end
63
    return articles_dir
64
  end
65
66
  # Prepares the articles_dir for home environment
67
  # @param [String] homework contains true or false. If your present Publication