Socket
Book a DemoInstallSign in
Socket

arrogance

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arrogance

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

h1. Arrogance

h2. What Arrogance does

Arrogance provides an easy way to work with RSS/Atom feeds.

h2. How to use it

All you have to do is pass is a list of urls to following method:


    Arrogance::Lasso.read([list, of, urls])

Arguments: A list of urls. This param can take one of two forms:

1: Hash structured as follows:
 <pre><code>   
    {:term => [Array, of, urls],
     :barack_obamas_second_term => [Another, array, of, urls]
     :etc ... }
  </code></pre>
2: Array:
    <pre><code>
    [Array, of, urls, that, can, be, as, long, as, you, want]
    </code></pre>

Returns: In either case, the return will be of the same structure. However, any array(s) of urls passed in will be replaced (non-destructive) with array(s) of BlogObjects:


{:term => [BlogObject<#@&#>, BlogObject<@&^#^@>, BlogObject<rubbish_chars>]}
OR

[BlogObject<#@&#>, BlogObject<@&^#^@>, BlogObject<rubbish_chars>]
The returned BlogObject(s) can be manipulated as follows


    my_blog_object.most_recent 
    => {:title => 'Blogger stating opinions!', :date => '2011-11-11...', :etc => '...'} #<-- Thats a hash, treat it like one
    my_blog_object.most_recent[:title]
    => 'Blogger stating opinions!'
  

You can retrive individual posts by stating their position in reverse chronological order (newest first)

      
    my_blog_object.first
    => {:title => 'Blogger stating opinions!', :date => '2011-11-11 12:34:25', :etc => '...'}

    my_blog_object.first_and_seventh
    => [{:title => 'Blogger stating opinions', :yada => 'yada'}, {:title => 'Look at ma kittehs!!1!one', ...}]
  

Feel free to get rediculous. Doing


    my_blog_object.first_and_second_and_fourth_and_ninth

works just fine. You call up to #tenth

Additionally, you can retrive the feed title, site link and feed_image (if they exist) by calling feed_title, #site_link and #feed_image methods of the BlogObject

The guts of a BlogObject are 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.

h2. Contributing

Add whatever you think is needed and send a pull request or contact me (details below) with ideas.

h2. Contact

Email: providence.can@gmail.com

h2. License

Arrogance and all associated files are licensed under GPLv3

Copyright (c) Gideon J. Providence

FAQs

Package last updated on 17 Aug 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.