This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Games | |
module Acro | |
class Game | |
attr_reader :acronym | |
attr_reader :answers | |
attr_reader :voters | |
def initialize acronym = nil | |
@acronym = acronym ||= Random.new.rand(3..10).times.map { [*?A...?Z].sample }.join | |
@answers = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Games | |
module Acro | |
class Game | |
attr_reader :acronym | |
attr_reader :answers | |
attr_reader :voters | |
def initialize acronym = nil | |
@acronym = acronym ||= Random.new.rand(3..10).times.map { [*?A...?Z].sample }.join | |
@answers = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCinchPlugin | |
include Cinch::Plugin | |
react_on :channel | |
match /hello/, method: :execute_hello | |
def execute_hello m | |
m.reply "Hello, #{m.user.nick}!" | |
end | |
end |
NewerOlder