def line(color=nil)
      #
      # Makes the api call and returns either the stations on a particular line or
      # if no color is passed, returns the metro lines

      if !color.nil?
        color = color.downcase

        case color
        when "red"
          color = "RD"
        when "green"
          color = "GR"
        when "yellow"
          color = "YL"
        when "blue"
          color = "BL"
        when "orange"
          color = "OR"
        else
          color = "SV"
        end

        @metro_stations = RestClient.get "#{BASE_URL}/Rail.svc/json/jStations", :params => {
        "LineCode"         => color,
        "api_key"          => API_KEY,
        "subscription-key" => API_KEY
        }

        # @metro_stations = parse_json metro_stations
        # @metro_stations['Stations']
      else
        @metro_lines = RestClient.get "#{BASE_URL}/Rail.svc/json/JLines", :params => {
        "api_key"          => API_KEY,
        "subscription-key" => API_KEY
        }

        # @metro_lines = metro_lines
        # @metro_lines['Lines']

        # @metro_lines = get_all_stations
      end
    end
def line(color=nil)
      #
      # Makes the api call and returns either the stations on a particular line or
      # if no color is passed, returns the metro lines

      if !color.nil?
        color = color.downcase

        case color
        when "red"
          color = "RD"
        when "green"
          color = "GR"
        when "yellow"
          color = "YL"
        when "blue"
          color = "BL"
        when "orange"
          color = "OR"
        else
          color = "SV"
        end

        @metro_stations = RestClient.get "#{BASE_URL}/Rail.svc/json/jStations", :params => {
        "LineCode"         => color,
        "api_key"          => API_KEY,
        "subscription-key" => API_KEY
        }

        # @metro_stations = parse_json metro_stations
        # @metro_stations['Stations']
      else
        @metro_lines = RestClient.get "#{BASE_URL}/Rail.svc/json/JLines", :params => {
        "api_key"          => API_KEY,
        "subscription-key" => API_KEY
        }

        # @metro_lines = metro_lines
        # @metro_lines['Lines']

        # @metro_lines = get_all_stations
      end
    end
alerts