lib/gloo/app/platform.rb in gloo-1.4.2 vs lib/gloo/app/platform.rb in gloo-2.0.0
- old
+ new
@@ -15,11 +15,11 @@
require 'colorized_string'
require 'pastel'
module Gloo
module App
- class Platform < GlooLang::App::Platform
+ class Platform
DEFAULT_TMP_FILE = 'tmp.txt'.freeze
attr_reader :prompt
@@ -69,9 +69,16 @@
def edit initial_value
tmp = File.join( $settings.tmp_path, DEFAULT_TMP_FILE )
File.open( tmp, 'w' ) { |file| file.write( initial_value ) }
TTY::Editor.open( tmp )
return File.read( tmp )
+ end
+
+ #
+ # Get the file mechanism for this platform.
+ #
+ def getFileMech( engine )
+ return Gloo::Persist::DiscMech.new( engine )
end
# ---------------------------------------------------------------------
# Color helper
# ---------------------------------------------------------------------