Class: GlooLang::App::Platform
- Inherits:
-
Object
- Object
- GlooLang::App::Platform
- Defined in:
- lib/gloo_lang/app/platform.rb
Instance Method Summary collapse
-
#clear_screen ⇒ Object
Clear the screen.
-
#cols ⇒ Object
Get the number of horizontal columns on screen.
-
#edit(initial_value) ⇒ Object
Edit some temporary text and return the edited text.
-
#getColorizedString(string, color) ⇒ Object
Get colorized string.
-
#getFileMech(engine) ⇒ Object
Get the file mechanism for this platform.
-
#initialize ⇒ Platform
constructor
Set up Platform.
-
#lines ⇒ Object
Get the number of vertical lines on screen.
-
#prompt_cmd ⇒ Object
Prompt for the next command.
-
#show(msg, md = false, page = false) ⇒ Object
Show a message.
-
#show_table(headers, data, title = nil) ⇒ Object
Show the given table data.
Constructor Details
#initialize ⇒ Platform
Set up Platform.
17 18 |
# File 'lib/gloo_lang/app/platform.rb', line 17 def initialize end |
Instance Method Details
#clear_screen ⇒ Object
Clear the screen. Abstract–implment in subclass.
40 41 |
# File 'lib/gloo_lang/app/platform.rb', line 40 def clear_screen end |
#cols ⇒ Object
Get the number of horizontal columns on screen. Abstract–implment in subclass.
70 71 72 |
# File 'lib/gloo_lang/app/platform.rb', line 70 def cols return 80 end |
#edit(initial_value) ⇒ Object
Edit some temporary text and return the edited text. Abstract–implment in subclass.
47 48 49 |
# File 'lib/gloo_lang/app/platform.rb', line 47 def edit initial_value return initial_value end |
#getColorizedString(string, color) ⇒ Object
Get colorized string.
84 85 86 |
# File 'lib/gloo_lang/app/platform.rb', line 84 def getColorizedString( string, color ) return str end |
#getFileMech(engine) ⇒ Object
Get the file mechanism for this platform.
77 78 79 |
# File 'lib/gloo_lang/app/platform.rb', line 77 def getFileMech( engine ) return GlooLang::Persist::DiscMech.new( engine ) end |
#lines ⇒ Object
Get the number of vertical lines on screen. Abstract–implment in subclass.
62 63 64 |
# File 'lib/gloo_lang/app/platform.rb', line 62 def lines return 40 end |
#prompt_cmd ⇒ Object
Prompt for the next command. Abstract–implment in subclass.
32 33 34 |
# File 'lib/gloo_lang/app/platform.rb', line 32 def prompt_cmd return '' end |
#show(msg, md = false, page = false) ⇒ Object
Show a message. Abstract–implment in subclass.
24 25 26 |
# File 'lib/gloo_lang/app/platform.rb', line 24 def show( msg, md=false, page=false ) puts msg end |
#show_table(headers, data, title = nil) ⇒ Object
Show the given table data. Abstract–implment in subclass.
55 56 |
# File 'lib/gloo_lang/app/platform.rb', line 55 def show_table( headers, data, title = nil ) end |