Oh oops. Now I know why the class repo has placeholder.txt everywhere.

Sent from my iPhone

On 20/07/2013, at 11:10 AM, Ben Askins <notifications@github.com> wrote:

> In 06_Sharing_Behaviour/homework/midterm/locations.rb:
> 
> > +    end
> > +    @locations[user_selection.to_i-1]
> > +  end
> > +
> > +  protected
> > +
> > +  def output_locations
> > +    @locations = @locations_data.find_all{ |t| t.attrs[:placeType][:name] == "Country" }.sort_by!{ |t| t.attrs[:name] }
> > +    @locations.each_with_index do |location,index|
> > +      print_output "[#{index+1} #{location[:name]}]  "
> > +    end
> > +  end
> > +
> > +  def load_data
> > +    get_data = Twitter.trends_available.to_yaml
> > +    File.open("yaml/locations.yaml", 'w') { |file| file.write(get_data) }
> This initially failed with an exception... No such file or directory - yaml/locations.yaml (Errno::ENOENT) and I had to manually make the yaml directory. You can commit 'empty' directories to a git repo by adding an empty hidden file to them, like .keep for example.
> 
> —
> Reply to this email directly or view it on GitHub.