Class: Textus::Step::Base
- Inherits:
-
Object
- Object
- Textus::Step::Base
- Defined in:
- lib/textus/step/base.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Assigned by the loader/registry at registration time.
Class Method Summary collapse
-
.kind ⇒ Object
The step kind is derived from class hierarchy.
-
.required_kwargs ⇒ Object
Required #call kwargs the loader validates against the subclass.
-
.step_name(value = :__read__) ⇒ Object
Built-ins (and only built-ins) override the registered name when the Ruby class name can’t carry it (e.g. “markdown-links”).
Instance Attribute Details
#name ⇒ Object
Assigned by the loader/registry at registration time.
32 33 34 |
# File 'lib/textus/step/base.rb', line 32 def name @name end |
Class Method Details
.kind ⇒ Object
The step kind is derived from class hierarchy.
8 9 10 11 12 13 14 15 |
# File 'lib/textus/step/base.rb', line 8 def kind return :fetch if defined?(Step::Fetch) && self <= Step::Fetch return :transform if defined?(Step::Transform) && self <= Step::Transform return :validate if defined?(Step::Validate) && self <= Step::Validate return :observe if defined?(Step::Observe) && self <= Step::Observe raise NotImplementedError.new("#{self} is not a known step kind") end |
.required_kwargs ⇒ Object
Required #call kwargs the loader validates against the subclass.
18 |
# File 'lib/textus/step/base.rb', line 18 def required_kwargs = [] |
.step_name(value = :__read__) ⇒ Object
Built-ins (and only built-ins) override the registered name when the Ruby class name can’t carry it (e.g. “markdown-links”).
22 23 24 25 26 27 28 |
# File 'lib/textus/step/base.rb', line 22 def step_name(value = :__read__) if value == :__read__ @step_name else @step_name = value.to_s end end |