Class: Arrogance::Lasso
- Inherits:
-
Object
- Object
- Arrogance::Lasso
- Defined in:
- lib/arrogance.rb
Class Method Summary collapse
- .build_a_hash_response(urls) ⇒ Object
- .build_an_array_reponse(urls) ⇒ Object
-
.read(urls) ⇒ Object
– The guts of a BlogObject is really just an array of hashes.
Class Method Details
.build_a_hash_response(urls) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/arrogance.rb', line 52 def build_a_hash_response(urls) arrogance = {} urls.each do |k, v| arrogance[k] = v.collect {|url| Wrangler.beat_into_submission(url)} end return arrogance end |
.build_an_array_reponse(urls) ⇒ Object
60 61 62 |
# File 'lib/arrogance.rb', line 60 def build_an_array_reponse(urls) return urls.collect {|url| Wrangler.beat_into_submission(url)} end |
.read(urls) ⇒ Object
– The guts of a BlogObject is really just an array of hashes. If you just want to deal with that yourself – and not take advantage of all the cool methods I made for you, thats fine. Just call my_blog_object.guts – and you can get that array of hashes to play with.
44 45 46 47 48 49 50 |
# File 'lib/arrogance.rb', line 44 def read(urls) if urls.kind_of? Hash return build_a_hash_response urls elsif urls.kind_of? Array return build_an_array_reponse urls end end |