24 Jan '14, 3am

From Lousy to Beautiful

module StatsApi require 'json' require 'httparty' require 'active_support/core_ext/string' require 'jsonpath' ## Reader: note that @error is raised so that we can easily handle that in our parent methods... def find_users_stats(users_handle) # This will call the Stats API and pull back the user's stats. # All of the API settings are found in config/settings/api.yml. # Finding the Account... params = { user: users_handle } call_stats_api('get', 200, true, params) ## Reader: note that the following line is optional as you could have conditional code in ## the parental method based on @call_succeeded. raise @error = 'Account not found.' unless @call_succeeded # Finding the User's information... ## Reader note that we raise @error so that we can easily handle that in our parent methods... todays_stats = JsonPath.on(@result.body, '$.').first raise @error = "Today's Stats were n...

Full article: http://rubylearning.com/blog/2014/01/24/from-lousy-to-bea...

Tweets

From Lousy to Beautiful

rubyflow.com 24 Jan '14, 3am

Due to the inherent flexibility of Ruby, there are often several ways of doing the same thing. But how do you recognize th...

You Are Beautiful

crystalstine.me 23 Jan '14, 1pm

You Are Beautiful January 22, 2014 by Crystal Stine 1 Comment You are beautiful. Just as you are. Whether you’re heading o...

Giveaway Spotted Enter to win your choice of handbag, shoes & accessory! #MyChicSo…

Giveaway Spotted Enter to win your choice of ha...

letitbebeautiful.com 24 Jan '14, 2pm

Since DC got hit with a tiny snow storm a few days ago, I have yet to leave the house or my pjs for that matter. Yesterday...

Frogs singing in Malaysian swamp at dusk judged to be 'most beautiful sound in the world'

Frogs singing in Malaysian swamp at dusk judged...

treehugger.com 21 Jan '14, 9pm

Winner of an online competition Sound expert Julian Treasure created an online competition to discover what the most 'beau...

18 strange and beautiful hummingbird species

18 strange and beautiful hummingbird species

mnn.com 14 Jan '14, 4pm

captures a diversity of species in his travels, but he is particularly good at capturing these tiny flying jewels, and has...

These Frost Patterns Prove Winter Can Be Beautiful #SHFT #winter

These Frost Patterns Prove Winter Can Be Beauti...

shft.com 16 Jan '14, 11pm

Frost forms on windows when there's cold air outside and moist, warm air inside. The different patterns can be influenced ...

Some beautiful and unique windows in natural ho...

naturalhomes.org 25 Jan '14, 8pm

This is the kitchen window to Ianto and Linda's home at Cob Cottage Company in Oregon, USA. The window has been pargeted, ...

Beautiful windows in natural homes around the w...

naturalhomes.org 26 Jan '14, 9am

This is the kitchen window to Ianto and Linda's home at Cob Cottage Company in Oregon, USA. The window has been pargeted, ...