module Phi::Cli

Public Instance Methods

run() click to toggle source
# File lib/phi/cli.rb, line 14
def run
  Phi::Losophy.new(term).tap { |phi| puts "The Philosophy Index of #{term} is #{phi.index}." }
rescue
  puts "Philosophy index cannot be calculated"
end
term() click to toggle source
# File lib/phi/cli.rb, line 7
def term
  ARGV.fetch(0) { 
    puts 'Must provide term to phi command. Usage: `phi term`' 
    exit 1
  }
end