Method: Course::Step#initialize
- Defined in:
- lib/course/step.rb
#initialize(target, block, **options) ⇒ Step
Returns a new instance of Step.
7 8 9 10 11 12 13 14 |
# File 'lib/course/step.rb', line 7 def initialize(target, block, **) raise ArgumentError, 'Cannot create a step with both name and block' if !target.nil? && !block.nil? raise ArgumentError, 'Step name or block should be passed' if target.nil? && block.nil? @target = target = @block = block end |