# File lib/ruote/reader/ruby_dsl.rb, line 124 def self.create_branch(name, attributes, &block) name = name[1..-1] while name[0, 1] == '_' h = attributes.each_with_object({}) { |a, h1| if a.is_a?(Hash) h1.merge!(a) else h1[a] = nil end }.remap { |(k, v), h1| k = k.is_a?(Regexp) ? k.inspect : k.to_s h1[k] = to_json(v) } c = BranchContext.new(name, h) c.instance_eval(&block) if block c.to_a end