Module: Phi::Cli

Extended by:
Cli
Included in:
Cli
Defined in:
lib/phi/cli.rb

Instance Method Summary collapse

Instance Method Details

#runObject



14
15
16
17
# File 'lib/phi/cli.rb', line 14

def run
  i = Phi::Losophy.new(term).index
  puts "The Philosophy Index of #{term} is #{i}."
end

#termObject



7
8
9
10
11
12
# 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