Module: WWDC::Helpers
- Defined in:
- lib/wwdc/helpers.rb
Instance Method Summary collapse
Instance Method Details
#describe(session) ⇒ Object
15 16 17 18 19 |
# File 'lib/wwdc/helpers.rb', line 15 def describe(session) puts %{\033[1m#{session['number']}: "#{session['title']}"\033[0m} puts session['description'] puts end |
#get(options = {}) {|response| ... } ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/wwdc/helpers.rb', line 6 def get( = {}, &block) response = client.get() say_error "Error #{response.status}" and abort unless response.status == 200 yield response if block_given? JSON.parse(response.body) end |