Class: Simple2ch::BBS
- Inherits:
-
Object
- Object
- Simple2ch::BBS
- Defined in:
- lib/simple2ch/bbs.rb
Instance Attribute Summary collapse
-
#boards(force_reload: nil, bbsmenu_url: nil) ⇒ Array<Simple2ch::Board>
readonly
板リスト.
-
#type_of_2ch ⇒ Object
readonly
Returns the value of attribute type_of_2ch.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(type_of_2ch) ⇒ BBS
constructor
A new instance of BBS.
- #root ⇒ Object
Constructor Details
#initialize(type_of_2ch) ⇒ BBS
Returns a new instance of BBS.
11 12 13 14 15 16 17 18 19 |
# File 'lib/simple2ch/bbs.rb', line 11 def initialize(type_of_2ch) case type_of_2ch when :sc, :open @type_of_2ch = type_of_2ch else raise %{Invalid "type_of_2ch" given: #{type_of_2ch} (:sc or :open is correct.)} end @updated_at = Time.now end |
Instance Attribute Details
#boards(force_reload: nil, bbsmenu_url: nil) ⇒ Array<Simple2ch::Board> (readonly)
Returns 板リスト.
27 28 29 |
# File 'lib/simple2ch/bbs.rb', line 27 def boards @boards end |
#type_of_2ch ⇒ Object (readonly)
Returns the value of attribute type_of_2ch.
9 10 11 |
# File 'lib/simple2ch/bbs.rb', line 9 def type_of_2ch @type_of_2ch end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
9 10 11 |
# File 'lib/simple2ch/bbs.rb', line 9 def updated_at @updated_at end |
Instance Method Details
#root ⇒ Object
21 22 23 |
# File 'lib/simple2ch/bbs.rb', line 21 def root File.dirname __dir__ end |