method
to_json
rails latest stable - Class:
ActionDispatch::Journey::GTG::TransitionTable
to_json()public
No documentation available.
# File actionpack/lib/action_dispatch/journey/gtg/transition_table.rb, line 46
def to_json
require 'json'
simple_regexp = Hash.new { |h,k| h[k] = {} }
@regexp_states.each do |from, hash|
hash.each do |re, to|
simple_regexp[from][re.source] = to
end
end
JSON.dump({
regexp_states: simple_regexp,
string_states: @string_states,
accepting: @accepting
})
end