Module: AR::Enum::CommandRecorder
- Defined in:
- lib/ar/enum/command_recorder.rb
Instance Method Summary collapse
- #create_enum(name, values) ⇒ Object
- #invert_create_enum(args) ⇒ Object
- #invert_rename_enum_label(args) ⇒ Object
- #rename_enum_label(name, from, to) ⇒ Object
Instance Method Details
#create_enum(name, values) ⇒ Object
6 7 8 |
# File 'lib/ar/enum/command_recorder.rb', line 6 def create_enum(name, values) record(__method__, [name, values]) end |
#invert_create_enum(args) ⇒ Object
14 15 16 17 |
# File 'lib/ar/enum/command_recorder.rb', line 14 def invert_create_enum(args) name, _ = args [:drop_enum, name] end |
#invert_rename_enum_label(args) ⇒ Object
19 20 21 22 |
# File 'lib/ar/enum/command_recorder.rb', line 19 def invert_rename_enum_label(args) name, to, from = args [:rename_enum_label, [name, from, to]] end |
#rename_enum_label(name, from, to) ⇒ Object
10 11 12 |
# File 'lib/ar/enum/command_recorder.rb', line 10 def rename_enum_label(name, from, to) record(__method__, [name, from, to]) end |