Skip to content

Commit

Permalink
Add #all_members as alias for #all_girls
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jul 4, 2023
1 parent 9080296 commit be6a68c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,22 +502,25 @@ When `Rubicure::Girl` has `human_full_name` (i.e. another `human_name`), she ret

and [more aliases!](config/movies.yml)

### `Precure.all_girls` (a.k.a. `Precure.all`)
### `Precure.all_members` (a.k.a. `Precure.all`)
```ruby
>> Precure.all_girls.count
>> Precure.all_girls.map(&:precure_name)
>> Precure.all_members.count
>> Precure.all_members.map(&:precure_name)
# returns current precure count and names

>> Precure.all_girls("2013-10-26").count
>> Precure.all_members("2013-10-26").count
=> 34

>> Precure.all_girls.include?(Cure.echo)
>> Precure.all_members.include?(Cure.echo)
=> true
```

#### `Precure.all_girls` vs `Precure.all_stars`
* `Precure.all_girls` returns all precure. (includes "Kirakira Precure Alamode")
* `Precure.all_stars` returns only from "Futari wa Pretty Cure" to "Maho Girls PreCure"
* Now, `Precure.all_members?` is alias to `Precure.all_girls?`. But I'm going to change this behavior in the next major version (v4)
* ref. https://github.com/sue445/rubicure/issues/284

#### `Precure.all_members` vs `Precure.all_stars`
* `Precure.all_members` returns all precure. (includes "Kirakira Precure Alamode")
* `Precure.all_members` returns only from "Futari wa Pretty Cure" to "Maho Girls PreCure"

### `Precure.dream_stars`
```ruby
Expand Down
1 change: 1 addition & 0 deletions lib/rubicure/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def all_girls(arg = Time.current)
end

alias_method :all, :all_girls
alias_method :all_members, :all_girls

# Get precure dream stars
#
Expand Down

0 comments on commit be6a68c

Please sign in to comment.