Class: GitJump::Actions::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/git_jump/actions/base.rb

Overview

Base class for all actions

Direct Known Subclasses

Add, Clear, Install, Jump, List, Status

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config:, database:, repository:, output:) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
14
# File 'lib/git_jump/actions/base.rb', line 9

def initialize(config:, database:, repository:, output:)
  @config = config
  @database = database
  @repository = repository
  @output = output
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/git_jump/actions/base.rb', line 7

def config
  @config
end

#databaseObject (readonly)

Returns the value of attribute database.



7
8
9
# File 'lib/git_jump/actions/base.rb', line 7

def database
  @database
end

#outputObject (readonly)

Returns the value of attribute output.



7
8
9
# File 'lib/git_jump/actions/base.rb', line 7

def output
  @output
end

#repositoryObject (readonly)

Returns the value of attribute repository.



7
8
9
# File 'lib/git_jump/actions/base.rb', line 7

def repository
  @repository
end

Instance Method Details

#executeObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/git_jump/actions/base.rb', line 16

def execute
  raise NotImplementedError, "#{self.class} must implement #execute"
end