{"size": 988, "ext": "js", "max_stars_repo_path": "src/views/bus-stops.js", "max_stars_repo_name": "jmmerino/busal-pebble", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/views/bus-stops.js", "max_issues_repo_name": "jmmerino/busal-pebble", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/views/bus-stops.js", "max_forks_repo_name": "jmmerino/busal-pebble", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.5238095238, "max_line_length": 61, "alphanum_fraction": 0.4210526316}

(function() {
    "use strict";   

    var UI = require('ui'),
        busStops = {};

    busStops.setEvent = function(event) {
        this.event = event;
    };  

    busStops.show = function (data) {                        

        // Construct Menu to show to user
        busStops.view = new UI.Menu({
            sections: [{
                title: 'Paradas ' + data.idl,
                items: busStops.parseBusStopItems(data)
            }]
        });    
        
        // Show the Menu
        busStops.view.show();                
    };

    busStops.hide = function() {
        busStops.view.hide();     
    };

    busStops.parseBusStopItems = function(data) {        
        var items = [];
        for (var i = 0; i < data.length; i++) {        
            items.push({                
                title: data[ i ].name,
                subtitle: data[ i ].proxima
            });
        }
        return items;
    };

    module.exports = busStops;
})();