Layouts use strings as keys, so that must be realistic
parent
78ee185fde
commit
b5903293d7
|
|
@ -65,7 +65,7 @@ module Squib
|
|||
val = instance_variable_get(attribute)
|
||||
if val.respond_to? :each
|
||||
new_val = val.map.with_index do |v, i|
|
||||
v ||= layout[layout_args[i].to_s][param] unless layout_args[i].nil?
|
||||
v ||= layout[layout_args[i].to_s][param.to_s] unless layout_args[i].nil?
|
||||
v ||= default
|
||||
end
|
||||
instance_variable_set(attribute, new_val)
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ describe Squib::Args::Box do
|
|||
|
||||
context 'layouts' do
|
||||
let(:layout) do
|
||||
{ 'attack' => { x: 50 },
|
||||
'defend' => { x: 60 } }
|
||||
{ 'attack' => { 'x' => 50 },
|
||||
'defend' => { 'x' => 60 } }
|
||||
end
|
||||
|
||||
it 'are used when not specified' do
|
||||
|
|
|
|||
Loading…
Reference in New Issue