Refactoring.

This commit is contained in:
Martin Edenhofer 2015-08-31 15:01:08 +02:00
parent 848adb944a
commit 293a7495d5

View file

@ -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