rssf_brazil_parser 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/rssf_brazil_parser.rb +34 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d7f20e18a821f6df5a92725fdb53e0b24bf02c21
4
+ data.tar.gz: 16355293fa80cac296ca2a2d6f23587da19f2253
5
+ SHA512:
6
+ metadata.gz: ef5399ad540751a4644f2122e8baaba5fefdbea4876545ac5f93e7a891e7844a876492aa94cf273042557940839863e214f24e7e313bc167c01013266c06415a
7
+ data.tar.gz: fe0188bb2997d001c4c9e5c3bafce6d9c69df68ab185557aa1f6d611d061a308d90fc598b25b85755e1ccc80641eb6dc4b62c9596a1becc8b86ac49c5609374e
@@ -0,0 +1,34 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'I18n'
4
+
5
+ class RssfBrazilParser
6
+ attr_accessor :text, :lines, :round, :games, :months
7
+
8
+ def initialize
9
+ @months = I18n.t("date.abbr_month_names")
10
+ end
11
+
12
+ def parse_text_to_lines
13
+ @lines = @text.split("\n")
14
+
15
+ self
16
+ end
17
+
18
+ def iterate_lines
19
+
20
+ self.set_round
21
+ end
22
+
23
+ def set_round
24
+ @lines.each do |line|
25
+
26
+ is_round = line.match /(Round)/
27
+
28
+ if is_round
29
+ @round = line.sub(/Round/, "").strip
30
+ end
31
+
32
+ end
33
+ end
34
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rssf_brazil_parser
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Luiz Henrique A. da Silva
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: The parser for data from RSSF Brazil.
14
+ email:
15
+ - luizhrqas@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/rssf_brazil_parser.rb
21
+ homepage: http://henriquealmeida.net/
22
+ licenses: []
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.1.8
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: RSSF Brazil Parser
44
+ test_files: []