Class: Text2isometric::Commands
- Inherits:
-
Thor
- Object
- Thor
- Text2isometric::Commands
- Defined in:
- lib/text2isometric.rb
Instance Method Summary collapse
- #cube ⇒ Object
- #front(text) ⇒ Object
-
#initialize(*args) ⇒ Commands
constructor
A new instance of Commands.
- #instgrafflescript ⇒ Object
- #plane(text) ⇒ Object
- #side(text) ⇒ Object
- #top(text) ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(*args) ⇒ Commands
Returns a new instance of Commands.
11 12 13 14 |
# File 'lib/text2isometric.rb', line 11 def initialize(*args) super @output_dir = File.('~') + "/isometric" end |
Instance Method Details
#cube ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/text2isometric.rb', line 49 def cube cube = " .......\n .... ....\n .... ....\n .... t ....\n .... o ...\n|... p ...|\n| .... .... |\n| .... .... |\n| .... .... |\n| f .... ... |\n| r | |\n| o | e |\n| n | d |\n| t | i |\n| | s |\n...... | .... e\n ..... | ..... n\n ..... | ..... a\n ....|.... l\n . p\n\n\n" print cube end |
#front(text) ⇒ Object
39 40 41 |
# File 'lib/text2isometric.rb', line 39 def front(text) create_isometric(text, 'front') end |
#instgrafflescript ⇒ Object
22 23 24 25 26 |
# File 'lib/text2isometric.rb', line 22 def instgrafflescript script_path = File.('../../templates/isometric-text.scpt',__FILE__) dest_path = File.('~') + "/Library/Scripts/Applications/OmniGraffle/" system "cp -v #{script_path} #{dest_path}" end |
#plane(text) ⇒ Object
34 35 36 |
# File 'lib/text2isometric.rb', line 34 def plane(text) create_isometric(text, 'plane') end |
#side(text) ⇒ Object
29 30 31 |
# File 'lib/text2isometric.rb', line 29 def side(text) create_isometric(text, 'side') end |
#top(text) ⇒ Object
44 45 46 |
# File 'lib/text2isometric.rb', line 44 def top(text) create_isometric(text, 'top') end |
#version ⇒ Object
17 18 19 |
# File 'lib/text2isometric.rb', line 17 def version print Text2isometric::VERSION + "\n" end |