Refactoring.
This commit is contained in:
parent
848adb944a
commit
293a7495d5
1 changed files with 1 additions and 6 deletions
|
@ -137,12 +137,7 @@ reset config setting to default
|
||||||
|
|
||||||
# convert state ot hash to be able to store it as store
|
# convert state ot hash to be able to store it as store
|
||||||
def state_check
|
def state_check
|
||||||
|
return if state.class == Hash && state.key?(:value)
|
||||||
return if !state
|
|
||||||
return if state == false
|
|
||||||
|
|
||||||
return if state.respond_to?('has_key?') && state.key?(:value)
|
|
||||||
|
|
||||||
self.state = { value: state }
|
self.state = { value: state }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue