Skip to content

Commit

Permalink
Fix generated instance methods.
Browse files Browse the repository at this point in the history
The follow generated methods is based on column not bit field.

    Spaceship#all_features # [:warpdrive, :shields, :electrolytes]
    Spaceship#selected_features
    Spaceship#select_all_features
    Spaceship#unselect_all_features
    Spaceship#selected_features=

PS: it misleading me to reinvent the wheels when it incorrectly documented.
  • Loading branch information
xpol authored Apr 18, 2018
1 parent 826e7f9 commit 6e87651
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,19 @@ has_flags 1 => :spock,
Calling `has_flags`, as shown above on the 'features' column, creates the following instance methods
on Spaceship:

Spaceship#all_features # [:warpdrive, :shields, :electrolytes]
Spaceship#selected_features
Spaceship#select_all_features
Spaceship#unselect_all_features
Spaceship#selected_features=

Spaceship#warpdrive
Spaceship#warpdrive?
Spaceship#warpdrive=
Spaceship#not_warpdrive
Spaceship#not_warpdrive?
Spaceship#not_warpdrive=
Spaceship#warpdrive_changed?
Spaceship#all_warpdrives
Spaceship#selected_warpdrives
Spaceship#select_all_warpdrives
Spaceship#unselect_all_warpdrives
Spaceship#selected_warpdrives=
Spaceship#has_warpdrive?

Spaceship#shields
Expand All @@ -234,11 +235,6 @@ on Spaceship:
Spaceship#not_shields?
Spaceship#not_shields=
Spaceship#shields_changed?
Spaceship#all_shields
Spaceship#selected_shields
Spaceship#select_all_shields
Spaceship#unselect_all_shields
Spaceship#selected_shields=
Spaceship#has_shield?

Spaceship#electrolytes
Expand All @@ -248,11 +244,6 @@ on Spaceship:
Spaceship#not_electrolytes?
Spaceship#not_electrolytes=
Spaceship#electrolytes_changed?
Spaceship#all_electrolytes
Spaceship#selected_electrolytes
Spaceship#select_all_electrolytes
Spaceship#unselect_all_electrolytes
Spaceship#selected_electrolytes=
Spaceship#has_electrolyte?


Expand Down

0 comments on commit 6e87651

Please sign in to comment.