A simple gem to parse the Picturehouse Cinemas UK website and spit out useful formatted info.
Add this line to your application's Gemfile:
gem 'picturehouse_uk'
And then execute:
$ bundle
Or install it yourself as:
$ gem install picturehouse_uk
PicturehouseUK::Cinema.all
#=> [
<PicturehouseUK::Cinema brand="Picturehouse" name="Duke's at Komedia" slug="dukes-at-komedia" chain_id="Dukes_At_Komedia" url="...">,
<PicturehouseUK::Cinema brand="Picturehouse" name="Duke of York's" slug="duke-of-yorks" chain_id="Duke_Of_Yorks" url="...">,
...
]
PicturehouseUK::Cinema.find('Duke_Of_Yorks')
#=> <PicturehouseUK::Cinema brand="Picturehouse" name="Duke_Of_Yorks" slug="duke-of-yorks" address="..." chain_id="Duke_Of_Yorks" url="...">
cinema.brand
#=> 'Picturehouse'
cinema.chain_id
#=> 'Duke_Of_Yorks'
cinema.url
#=> "http://www.picturehouses.co.uk/cinema/Duke_Of_Yorks/"
cinema.films
#=> [<PicturehouseUK::Film name="Iron Man 3">, <PicturehouseUK::Film name="Star Trek: Into Darkness">]
cinema.screenings
#=> [<PicturehouseUK::Screening film="About Time" when="2013-09-09 11:00 UTC" varient="3d">, <PicturehouseUK::Screening film="Iron Man 3" when="2013-09-09 13:50 UTC" varient="kids">, <PicturehouseUK::Screening ..>, <PicturehouseUK::Screening ...>]
To redownload the test URLs run
ruby test/fixture_updater.rb
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request