class AustinCrime::CLI

this is my controller

Public Class Methods

new() click to toggle source
# File lib/austin_crime/cli.rb, line 4
def initialize; end

Public Instance Methods

call() click to toggle source
# File lib/austin_crime/cli.rb, line 6
def call
  puts 'Welcome to Austin Crime Search!'
  inputs
  menu
  # cya
end
inputs() click to toggle source
# File lib/austin_crime/cli.rb, line 13
  def inputs
    # Select type of crime to view
    puts <<-DOC
    1. DWI
    2. HARASSMENT
    3. CRUELTY TO ANIMALS
    4. THEFT
    DOC

    # @crimes = AustinCrime::Crime.all
    # @crimes.each.with_index(1) do |crime, i|
    #   puts "#{i}. #{crime.type} - #{crime.increp} - #{crime.date}"
    # end
  end
menu() click to toggle source