8000 Make Rubocop happy by jhollinger · Pull Request #513 · procore-oss/blueprinter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make Rubocop happy #513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions lib/blueprinter/blueprint_validator.rb
640C
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ class << self
# @return [Boolean] true if object is a valid Blueprint
# @raise [Blueprinter::Errors::InvalidBlueprint] if the object is not a valid Blueprint.
def validate!(blueprint)
if valid_blueprint?(blueprint)
true
else
raise(
Errors::InvalidBlueprint,
"#{blueprint} is not a valid blueprint. Please ensure it subclasses Blueprinter::Base or is a Proc."
)
end
valid_blueprint?(blueprint) || raise(
Errors::InvalidBlueprint,
"#{blueprint} is not a valid blueprint. Please ensure it subclasses Blueprinter::Base or is a Proc."
)
end

private
Expand Down
Loading
0