Class: DeclareSchema::SchemaChange::Base
- Inherits:
-
Object
- Object
- DeclareSchema::SchemaChange::Base
show all
- Defined in:
- lib/declare_schema/schema_change/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/declare_schema/schema_change/base.rb', line 9
def format_options(options)
options.map do |k, v|
value =
if v.is_a?(Hash)
"{ #{format_options(v).join(', ')} }"
else
v.inspect
end
if k.is_a?(Symbol)
"#{k}: #{value}"
else
"#{k.inspect} => #{value}"
end
end
end
|
Instance Method Details
#down ⇒ Object
30
31
32
|
# File 'lib/declare_schema/schema_change/base.rb', line 30
def down
down_command + spacing(down_command)
end
|
#up ⇒ Object
26
27
28
|
# File 'lib/declare_schema/schema_change/base.rb', line 26
def up
up_command + spacing(up_command)
end
|