Sha256: b838bf52cf0175d3c7acdf4d7dcd4dff04c5302e406a9646c29469182d87bff7
Contents?: true
Size: 394 Bytes
Versions: 27
Compression:
Stored size: 394 Bytes
Contents
module CPEE class StateMachine def initialize(file,readonly,&state) @states = XML::Smart.open_unprotected(file) @state = state @readonly = readonly end def setable?(id,nval) cval = @state.call(id) @states.find("/states/setable/#{cval}[#{nval}]").length > 0 end def readonly?(id) @readonly.include? @state.call(id) end end end
Version data entries
27 entries across 27 versions & 1 rubygems