Class: Okao::CLI
- Inherits:
-
Thor
- Object
- Thor
- Okao::CLI
- Defined in:
- lib/okao/cli.rb
Constant Summary collapse
- OKAOS =
['(^-^)', '(´O`)', '(;-;)', '(´Д`)', '(。-_-。)', '(´・ω・`)', '(-_-;)', '(_ _)']
Instance Method Summary collapse
Instance Method Details
#exec(okao = nil) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/okao/cli.rb', line 32 def exec(okao = nil) init_emoticon okao_text = load_file([:file_path]) okao_text ||= okao code = okao_text.split("\n").reduce('') do |acc, cur| "#{acc}#{Okao::Parser.to_text(cur)}" end eval(code) end |