Class: BardBot::Config
- Inherits:
-
Object
- Object
- BardBot::Config
- Defined in:
- lib/bard_bot/config.rb
Instance Attribute Summary collapse
- #character ⇒ Object
- #character_dir ⇒ Object
-
#max_length ⇒ Object
Returns the value of attribute max_length.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
6 7 8 9 10 11 |
# File 'lib/bard_bot/config.rb', line 6 def initialize @character = :hamlet @prefix = 2 @max_length = 100 @character_dir = :default end |
Instance Attribute Details
#character ⇒ Object
20 21 22 23 |
# File 'lib/bard_bot/config.rb', line 20 def character return BardBot.characters.sample if @character == :random @character end |
#character_dir ⇒ Object
13 14 15 16 17 18 |
# File 'lib/bard_bot/config.rb', line 13 def character_dir if @character_dir == :default return File.join(File.dirname(__FILE__), '..', '..', 'data') end @character_dir end |
#max_length ⇒ Object
Returns the value of attribute max_length.
3 4 5 |
# File 'lib/bard_bot/config.rb', line 3 def max_length @max_length end |
#prefix ⇒ Object
Returns the value of attribute prefix.
3 4 5 |
# File 'lib/bard_bot/config.rb', line 3 def prefix @prefix end |