Class: ActualDbSchema::Commands::Base
- Inherits:
-
Object
- Object
- ActualDbSchema::Commands::Base
- Defined in:
- lib/actual_db_schema/commands/base.rb
Overview
Base class for all commands
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(context) ⇒ Base
constructor
A new instance of Base.
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
#context ⇒ Object (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
#call ⇒ Object
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 |