Class: Bovem::Shell
- Inherits:
-
Object
- Object
- Bovem::Shell
- Includes:
- Bovem::ShellMethods::Directories, Bovem::ShellMethods::Execute, Bovem::ShellMethods::General, Bovem::ShellMethods::Read, Bovem::ShellMethods::Write
- Defined in:
- lib/bovem/shell.rb
Overview
A utility class for most common shell operation.
Instance Attribute Summary (collapse)
-
- (Console) console
A console instance.
-
- (I18n) i18n
readonly
A i18n helper.
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
Constructor Details
- (Shell) initialize
Initializes a new Shell.
520 521 522 523 |
# File 'lib/bovem/shell.rb', line 520 def initialize @console = Bovem::Console.instance @i18n = Bovem::I18n.new(root: "bovem.shell", path: Bovem::Application::LOCALE_ROOT) end |
Instance Attribute Details
- (Console) console
Returns A console instance.
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/bovem/shell.rb', line 502 class Shell include Bovem::ShellMethods::General include Bovem::ShellMethods::Read include Bovem::ShellMethods::Write include Bovem::ShellMethods::Execute include Bovem::ShellMethods::Directories attr_accessor :console attr_reader :i18n # 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 = Bovem::I18n.new(root: "bovem.shell", path: Bovem::Application::LOCALE_ROOT) end end |
- (I18n) i18n (readonly)
Returns A i18n helper.
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/bovem/shell.rb', line 502 class Shell include Bovem::ShellMethods::General include Bovem::ShellMethods::Read include Bovem::ShellMethods::Write include Bovem::ShellMethods::Execute include Bovem::ShellMethods::Directories attr_accessor :console attr_reader :i18n # 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 = Bovem::I18n.new(root: "bovem.shell", path: Bovem::Application::LOCALE_ROOT) end end |
Class Method Details
+ (Shell) instance
Returns a unique instance for Shell.
515 516 517 |
# File 'lib/bovem/shell.rb', line 515 def self.instance @instance ||= Bovem::Shell.new end |