Class: Cinch::Plugins::Fortune

Inherits:
Object
  • Object
show all
Includes:
Cinch::Plugin
Defined in:
lib/cinch/plugins/fortune.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.max_lengthObject

Returns the value of attribute max_length.



10
11
12
# File 'lib/cinch/plugins/fortune.rb', line 10

def max_length
  @max_length
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



11
# File 'lib/cinch/plugins/fortune.rb', line 11

def configure; yield self; end

Instance Method Details

#execute(m) ⇒ Object



16
17
18
# File 'lib/cinch/plugins/fortune.rb', line 16

def execute(m)
  m.reply [m.user.nick, fortune].join(": ")
end