class Mercurd::CLI

Public Instance Methods

cloc(src = nil) click to toggle source
# File lib/mercurd/cli.rb, line 27
def cloc(src = nil)
  cmd = `which cloc`
  puts "cloc not found" and return if cmd.blank?
  prefix =  "Count Lines of Code" 
  dir = src ? src : '.'
  ret = `cloc #{dir}`
  puts [prefix, ret].join("\n\n")
end
generate(entity, name) click to toggle source
# File lib/mercurd/cli.rb, line 37
def generate(entity, name)
  Mercurd::Generators::Feature.start([entity, name])
end
requirements() click to toggle source
# File lib/mercurd/cli.rb, line 22
def requirements
  `brew install cloc`
end
zen() click to toggle source
# File lib/mercurd/cli.rb, line 10
    def zen
      puts <<-ZEN
        The Zen of Code Reading

        - Good first.
        - Document first.
        - When have to.
        - For writting.
      ZEN
    end