Sha256: 5b78a9fa83bf76dde9d09733293d3a3755ddcc38b92c1ef050a188ba5d996f4f

Contents?: true

Size: 748 Bytes

Versions: 2

Compression:

Stored size: 748 Bytes

Contents

require 'cgi'
require 'httparty'
require 'multi_json'

require 'virility/version'
require 'virility/supporter'
require 'virility/excitation'
require 'virility/strategy'
require 'virility/exceptions'

Dir["#{File.dirname(__FILE__)}/virility/strategies/**/*.rb"].each {|f| require f}

module Virility

  #
  # Public API
  #

  def self.counts(url)
    Virility::Excitation.new(url).counts
  end

  def self.total(url)
    Virility::Excitation.new(url).total
  end

  def self.poll(url)
    Virility::Excitation.new(url).poll
  end

  def self.url(url)
    virility = Virility::Excitation.new(url)
    virility.poll
    virility
  end

  #
  # Factory
  #

  def self.factory(strategy, url)
    Virility::Excitation.new(url).send(strategy)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
virility-0.2.0 lib/virility.rb
virility-0.1.4 lib/virility.rb