Sha256: b96a2bdb865275282140bbf0553300d36c4d5f0d43da46e3262ec3f1de3c0f25

Contents?: true

Size: 1.74 KB

Versions: 1

Compression:

Stored size: 1.74 KB

Contents

# Simple2ch

2ch Japanese BBS simple reader for Ruby.

Ruby用の2chの簡易リーダーです。

![gem version](https://badge.fury.io/rb/simple2ch.svg)
[リファレンス](http://dogwood008.github.io/simple2ch/)

## 更新内容
[v0.1.2]
* リファクタリングとデバッグ
* メソッド修正
  * Thre#reses(Array<Fixnum>)で指定したレス番号のレスを取得
  * Thre#resesは今まで通り使用可能
* メソッド追加
  * Thre#received_anchors
    * 全レスについて被レスを返す
  * Res#received_anchors(Thre)
    * 自レスへの被レスを返す

[v0.1.1]
* メソッド追加
  * Res#anchorsの追加
    * レス中のアンカーを抽出する
* 必要gemの追加
  * Charwidthを追加

## Installation

Add this line to your application's Gemfile:

    gem 'simple2ch'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install simple2ch

## Usage
* 初期化
```ruby
require 'simple2ch'
```


* スレ取得
```ruby
board = Simple2ch::Board.new('ニュー速VIP', 'http://viper.2ch.sc/news4vip/')
board.thres #=>[#<Simple2ch::Thre>, ..., #<Simple2ch::Thre>]
```

* レス取得
```ruby
hoge = SUM_OF_NUMBER1
thre = board.thres[hoge] #=> #<Simple2ch::Thre>
thre.reses #=> [#<Simple2ch::Res>, ..., #<Simple2ch::Res>]
```

* 書き込み内容取得
```ruby
foo = SUM_OF_NUMBER2
res = thre.reses[foo] #=> #<Simple2ch::Res>
res.author #=> "以下、\(^o^)/でVIPがお送りします"
res.contents #=> "hoge foo bar"
```


## Contributing

1. Fork it ( https://github.com/dogwood008/simple2ch/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple2ch-0.1.2 README.md