Hello fellow Rubyists!
I have written a quick n dirty code to display the first 4 RSS entries
from a feed using “feedzirra” gem. The code is pretty straight forward:
I have two questions, related to this code:
- Is there any more elegant way to get the first for elements of
‘@entries’ object array?
- How should be defined the “feed_list” method in order to be called
like: feed = NewsDisplay::feed_list
I know I should put a ‘self’ reference somewhere. A little explanation
of who this technique works would be nice. I know that Class::method
calls might be
deprecated in the future. However even “Class.method” looks much more
elegant and I’d like to know how to implement it.
 Elegant = Easy to read, concise code snippet. Cryptic snippets are
not elegant imho.
Panagiotis (atmosx) Atmatzidis