lib/flows/railway/errors.rb in flows-0.3.0 vs lib/flows/railway/errors.rb in flows-0.4.0
- old
+ new
@@ -1,21 +1,17 @@
module Flows
- module Railway
- # rubocop:disable Style/Documentation
- class NoStepsError < ::Flows::Error
- def message
- 'No steps defined'
- end
- end
+ class Railway
+ # Base class for Railway errors
+ class Error < StandardError; end
- class NoStepImplementationError < ::Flows::Error
- def initialize(step_name)
- @step_name = step_name
+ # Raised when initializing Railway with no steps
+ class NoStepsError < Error
+ def initialize(klass)
+ @klass = klass
end
def message
- "Missing step definition: #{@step_name}"
+ "No steps defined for #{@klass}"
end
end
- # rubocop:enable Style/Documentation
end
end