Class: Sijka::Smoke
- Inherits:
-
Object
- Object
- Sijka::Smoke
- Defined in:
- lib/sijka/smoke.rb
Constant Summary collapse
- SLEEP_TIME =
0.02
Instance Method Summary collapse
-
#initialize(name, file_name) ⇒ Smoke
constructor
A new instance of Smoke.
- #smoke ⇒ Object
Constructor Details
#initialize(name, file_name) ⇒ Smoke
7 8 9 10 11 12 13 |
# File 'lib/sijka/smoke.rb', line 7 def initialize(name, file_name) set_standarted_img file_name @movement_range = TermInfo.screen_size[1] - @img_length = Translator.new.smoken_with_locale(file_name) = name.to_s.empty? ? "#{message}!" : "#{message}, #{name}!" end |
Instance Method Details
#smoke ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/sijka/smoke.rb', line 15 def smoke right_move reverse_img left_move puts sleep(1.3) system 'clear' end |