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
-
.instance ⇒ Shell
Returns a unique instance for Shell.
Instance Method Summary collapse
-
#initialize ⇒ Shell
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
#initialize ⇒ Shell
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 |