class Course::Step
Attributes
block[R]
options[R]
target[R]
Public Class Methods
new(target, block, **options)
click to toggle source
# File lib/course/step.rb, line 7 def initialize(target, block, **options) 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 @options = options @block = block end
Public Instance Methods
block?()
click to toggle source
# File lib/course/step.rb, line 20 def block? !@block.nil? end
method?()
click to toggle source
# File lib/course/step.rb, line 16 def method? target.is_a?(String) || target.is_a?(Symbol) end