Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes initializer to use board name

  • Loading branch information...
commit 672c2a201de668cfc61866c14bcdf9f9dd9a2e03 1 parent ca72c72
@tosik authored
Showing with 7 additions and 8 deletions.
  1. +1 −1  README.md
  2. +5 −6 lib/ikioi/checker.rb
  3. +1 −1  lib/ikioi/version.rb
View
2  README.md
@@ -17,7 +17,7 @@ Or install it yourself as:
## Usage
```
-checker = Ikioi::Checker.new('keyword')
+checker = Ikioi::Checker.new('keyword', 'board_name')
checker.fetch
```
View
11 lib/ikioi/checker.rb
@@ -4,12 +4,11 @@
module Ikioi
class Checker
- def initialize(keyword)
- @keyword = keyword
- end
+ attr_reader :keyword, :board_name
- def keyword
- @keyword
+ def initialize(keyword, board_name)
+ @keyword = keyword
+ @board_name = board_name
end
def fetch
@@ -23,7 +22,7 @@ def parse(jsonp)
end
def fetch_jsonp
- open('http://2ch-ranking.net/ranking.json?board=gameswf').read
+ open("http://2ch-ranking.net/ranking.json?board=#{board_name}").read
end
end
View
2  lib/ikioi/version.rb
@@ -1,3 +1,3 @@
module Ikioi
- VERSION = "0.0.1"
+ VERSION = "0.0.2"
end
Please sign in to comment.
Something went wrong with that request. Please try again.