class Unparser::Emitter::Pair
Emitter
for key value pairs in hash literals or kwargs
Constants
- BAREWORD
Private Instance Methods
colon?(key)
click to toggle source
# File lib/unparser/emitter/pair.rb, line 28 def colon?(key) n_sym?(key) && BAREWORD.match?(key.children.first) end
dispatch()
click to toggle source
# File lib/unparser/emitter/pair.rb, line 17 def dispatch if colon?(key) write(key.children.first.to_s, ': ') else visit(key) write(' => ') end visit(value) end