Class: BlockKit::Fixers::Base
- Inherits:
-
Object
- Object
- BlockKit::Fixers::Base
show all
- Includes:
- ActiveSupport::Callbacks
- Defined in:
- lib/block_kit/fixers/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(attribute:, **options) ⇒ Base
Returns a new instance of Base.
8
9
10
11
|
# File 'lib/block_kit/fixers/base.rb', line 8
def initialize(attribute:, **options)
@attribute = attribute.to_sym
@dangerous = options.delete(:dangerous)
end
|
Instance Method Details
#dangerous? ⇒ Boolean
17
18
19
|
# File 'lib/block_kit/fixers/base.rb', line 17
def dangerous?
!!@dangerous
end
|
#fix(model, fixing_dangerously: false) ⇒ Object
13
14
15
|
# File 'lib/block_kit/fixers/base.rb', line 13
def fix(model, fixing_dangerously: false)
raise NotImplementedError, "#{self.class} must implement `fix'"
end
|