Class: Command

Inherits:
Object
  • Object
show all
Defined in:
lib/freshmind.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lang = :en) ⇒ Command

Returns a new instance of Command.



6
7
8
# File 'lib/freshmind.rb', line 6

def initialize(lang=:en)
  @lang = lang
end

Instance Attribute Details

#langObject (readonly)

Returns the value of attribute lang.



5
6
7
# File 'lib/freshmind.rb', line 5

def lang
  @lang
end

Instance Method Details

#commandsObject



14
15
16
17
# File 'lib/freshmind.rb', line 14

def commands
  return "оплопл" if lang == :ru
  return "brlbrl" if lang == :en
end

#listObject



10
11
12
# File 'lib/freshmind.rb', line 10

def list
  (commands*100).split("").sample(300)
end