Class: Remap::Rule
- Inherits:
-
Dry::Interface
- Object
- Dry::Interface
- Remap::Rule
show all
- Includes:
- Catchable
- Defined in:
- lib/remap/rule.rb,
lib/remap/rule/map.rb,
lib/remap/rule/void.rb,
lib/remap/rule/block.rb,
lib/remap/rule/map/enum.rb,
lib/remap/rule/map/optional.rb,
lib/remap/rule/map/required.rb
Defined Under Namespace
Classes: Block, Map, Void
Constant Summary
collapse
- VOID =
Void.new(EMPTY_HASH)
Instance Method Summary
collapse
Methods included from Catchable
#catch_fatal, #catch_ignored
Instance Method Details
#call(state) ⇒ Object
17
18
19
|
# File 'lib/remap/rule.rb', line 17
def call(state)
raise NotImplementedError, "#{self.class}#call not implemented"
end
|
#inspect ⇒ String
Also known as:
to_s
22
23
24
|
# File 'lib/remap/rule.rb', line 22
def inspect
"#<#{self.class} #{to_hash.formatted}>"
end
|
#to_hash ⇒ Hash
28
29
30
|
# File 'lib/remap/rule.rb', line 28
def to_hash
attributes.transform_values(&:to_hash).except(:backtrace)
end
|