Class: Bovem::Shell
- Inherits:
-
Object
- Object
- Bovem::Shell
- Includes:
- Bovem::ShellMethods::Directories, Bovem::ShellMethods::Execute, Bovem::ShellMethods::General, Bovem::ShellMethods::Read, Bovem::ShellMethods::Write, Lazier::I18n
- Defined in:
- lib/bovem/shell.rb
Overview
A utility class for most common shell operation.
Instance Attribute Summary (collapse)
-
- (Console) console
A console instance.
Class Method Summary (collapse)
-
+ (Shell) instance
Returns a unique instance for Shell.
Instance Method Summary (collapse)
-
- (Shell) initialize
constructor
Initializes a new Shell.
Methods included from Bovem::ShellMethods::Directories
#create_directories, #within_directory
Methods included from Bovem::ShellMethods::Execute
Methods included from Bovem::ShellMethods::Write
Methods included from Bovem::ShellMethods::Read
Methods included from Bovem::ShellMethods::General
#handle_failure, #setup_error_handling, #show_general_failure
Constructor Details
- (Shell) initialize
Initializes a new Shell.
568 569 570 571 |
# File 'lib/bovem/shell.rb', line 568 def initialize @console = ::Bovem::Console.instance i18n_setup(:bovem, ::File.absolute_path(::Pathname.new(::File.dirname(__FILE__)).to_s + "/../../locales/")) end |
Instance Attribute Details
- (Console) console
A console instance.
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 |
# File 'lib/bovem/shell.rb', line 550 class Shell include Lazier::I18n include Bovem::ShellMethods::General include Bovem::ShellMethods::Read include Bovem::ShellMethods::Write include Bovem::ShellMethods::Execute include Bovem::ShellMethods::Directories attr_accessor :console # Returns a unique instance for Shell. # # @return [Shell] A new instance. def self.instance @instance ||= ::Bovem::Shell.new end # Initializes a new Shell. def initialize @console = ::Bovem::Console.instance i18n_setup(:bovem, ::File.absolute_path(::Pathname.new(::File.dirname(__FILE__)).to_s + "/../../locales/")) end end |
Class Method Details
+ (Shell) instance
Returns a unique instance for Shell.
563 564 565 |
# File 'lib/bovem/shell.rb', line 563 def self.instance @instance ||= ::Bovem::Shell.new end |