Module: Fourchan::Kit
- Defined in:
- lib/fourchan/kit.rb,
lib/fourchan/kit/cli.rb,
lib/fourchan/kit/api.rb,
lib/fourchan/kit/post.rb,
lib/fourchan/kit/board.rb,
lib/fourchan/kit/tools.rb,
lib/fourchan/kit/thread.rb,
lib/fourchan/kit/version.rb
Defined Under Namespace
Modules: API, Tools Classes: Board, CLI, Post, Thread
Constant Summary
- VERSION =
"0.2.0"
Class Method Summary (collapse)
-
+ (Array) fetch_fourchan_boards
Updates the list of boards and returns an array of the boards.
-
+ (Array) fourchan_boards
Returns an array of all boards' title, such as b, g, fit etc.
Class Method Details
+ (Array) fetch_fourchan_boards
Updates the list of boards and returns an array of the boards.
25 26 27 28 29 30 31 32 |
# File 'lib/fourchan/kit.rb', line 25 def self.fetch_fourchan_boards puts "Fetching all 4chan boards" $fourchan_boards = [] Fourchan::Kit::API.get_boards.each do |board| $fourchan_boards << board["board"] end $fourchan_boards end |
+ (Array) fourchan_boards
Returns an array of all boards' title, such as b, g, fit etc.
16 17 18 19 |
# File 'lib/fourchan/kit.rb', line 16 def self.fourchan_boards fetch_fourchan_boards if $fourchan_boards.empty? $fourchan_boards end |