lib/demiurge/action_item.rb
def dump_state(filename = "statedump.json")
      unless @item.state["admin"] # Admin-only command
        cancel_intention_if_present("The dump_state operation is admin-only!")
        return
      end

      ss = @item.engine.structured_state
      File.open(filename) do |f|
        f.print MultiJson.dump(ss, :pretty => true)
      end
      nil
    end
# Dump the engine's state as JSON, as an admin-only action.
#
# @param filename [String] The filename to dump state to.
# @return [void]
# @since 0.0.1
Dump the engine's state as JSON, as an admin-only action.
Dump the engine ' s state as JSON as an admin - only action .
def dump_state(filename = "statedump.json")
      unless @item.state["admin"] 
        cancel_intention_if_present("The dump_state operation is admin-only!")
        return
      end
      ss = @item.engine.structured_state
      File.open(filename) do |f|
        f.print MultiJson.dump(ss, :pretty => true)
      end
      nil
    end
def dump_state ( filename = "statedump.json" ) unless @item . state [ "admin" ] cancel_intention_if_present ( "The dump_state operation is admin-only!" ) return end ss = @item . engine . structured_state File . open ( filename ) do | f | f . print MultiJson . dump ( ss , :pretty => true ) end nil end
Dump the engine's state as JSON, as an admin-only action.
Dump the engine ' s state as JSON as an admin - only action .
# Admin-only command
None
void
filename
The filename to dump state to.
The filename to dump state to .
since
None