Skip to content

Commit e8442f8

Browse files
justin808claude
andcommitted
Add minimum_versions? predicate method for Ruby idiom
Add a predicate method with ? suffix for boolean checks, following Ruby convention. Update run_rspec.rake to use the predicate method with &:minimum_versions? instead of &:minimum_versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e5b89d3 commit e8442f8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

react_on_rails/rakelib/example_type.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ def self.all
1919

2020
attr_reader :packer_type, :name, :generator_options, :minimum_versions
2121

22+
# Ruby convention: predicate method with ? suffix for boolean checks
23+
def minimum_versions?
24+
minimum_versions
25+
end
26+
2227
def initialize(packer_type: nil, name: nil, generator_options: nil, minimum_versions: false)
2328
@packer_type = packer_type
2429
@name = name

react_on_rails/rakelib/run_rspec.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ namespace :run_rspec do
9292

9393
# Helper methods for filtering examples
9494
def latest_examples
95-
ExampleType.all[:shakapacker_examples].reject(&:minimum_versions)
95+
ExampleType.all[:shakapacker_examples].reject(&:minimum_versions?)
9696
end
9797

9898
def minimum_examples
99-
ExampleType.all[:shakapacker_examples].select(&:minimum_versions)
99+
ExampleType.all[:shakapacker_examples].select(&:minimum_versions?)
100100
end
101101

102102
desc "Runs Rspec for latest version example apps only (excludes minimum version tests)"

0 commit comments

Comments
 (0)