Class: Lutaml::Cli::InteractiveShell::CommandBase

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/cli/interactive_shell/command_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(shell) ⇒ CommandBase

Returns a new instance of CommandBase.



9
10
11
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 9

def initialize(shell)
  @shell = shell
end

Instance Attribute Details

#shellObject (readonly)

Returns the value of attribute shell.



7
8
9
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 7

def shell
  @shell
end

Instance Method Details

#bookmarksObject



19
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 19

def bookmarks = shell.bookmarks

#configObject



18
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 18

def config = shell.config

#current_pathObject



14
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 14

def current_path = shell.current_path

#current_path=(path) ⇒ Object



15
16
17
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 15

def current_path=(path)
  shell.instance_variable_set(:@current_path, path)
end

#last_resultsObject



20
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 20

def last_results = shell.last_results

#last_results=(results) ⇒ Object



21
22
23
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 21

def last_results=(results)
  shell.instance_variable_set(:@last_results, results)
end

#path_historyObject



24
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 24

def path_history = shell.path_history

#repositoryObject



13
# File 'lib/lutaml/cli/interactive_shell/command_base.rb', line 13

def repository = shell.repository