bovespa 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,5 +9,5 @@ Gem::Specification.new do |s|
9
9
  s.require_paths = ["lib"]
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.7")
11
11
  s.summary = %q{Ruby wrapper for the Bovespa API}
12
- s.version = '0.5.2'
12
+ s.version = '0.5.3'
13
13
  end
@@ -9,5 +9,5 @@ Gem::Specification.new do |s|
9
9
  s.require_paths = ["lib"]
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.7")
11
11
  s.summary = %q{Ruby wrapper for the Bovespa API}
12
- s.version = '0.5.1'
12
+ s.version = '0.5.2'
13
13
  end
@@ -1,6 +1,9 @@
1
- module Bovespa
1
+ require 'net/http'
2
+ require 'nokogiri'
2
3
 
3
- def ativo(codigo_ativo)
4
+ class Bovespa
5
+
6
+ def initialize(codigo_ativo)
4
7
  Net::HTTP.start('www.bmfbovespa.com.br') do |http|
5
8
  @resultado = http.get('/cotacoes2000/formCotacoesMobile.asp?codsocemi='+codigo_ativo).body
6
9
  end
@@ -1,6 +1,9 @@
1
- module Bovespa
1
+ require 'net/http'
2
+ require 'nokogiri'
2
3
 
3
- def ativo(codigo_ativo)
4
+ class Bovespa
5
+
6
+ def initialize(codigo_ativo)
4
7
  Net::HTTP.start('www.bmfbovespa.com.br') do |http|
5
8
  @resultado = http.get('/cotacoes2000/formCotacoesMobile.asp?codsocemi='+codigo_ativo).body
6
9
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bovespa
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Marco Antonio Foga\xC3\xA7a Nogueira"