Class: ActualDbSchema::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/actual_db_schema/commands/base.rb

Overview

Base class for all commands

Direct Known Subclasses

List, Rollback

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'lib/actual_db_schema/commands/base.rb', line 9

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



7
8
9
# File 'lib/actual_db_schema/commands/base.rb', line 7

def context
  @context
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
# File 'lib/actual_db_schema/commands/base.rb', line 13

def call
  unless ActualDbSchema.config.fetch(:enabled, true)
    raise "ActualDbSchema is disabled. Set ActualDbSchema.config[:enabled] = true to enable it."
  end

  call_impl
end