class AnyStyle::Feature::Indent
Public Instance Methods
observe(token, seq:, idx:, **opts)
click to toggle source
# File lib/anystyle/feature/indent.rb 4 def observe(token, seq:, idx:, **opts) 5 i = indent(token) 6 p = prev(idx, seq) 7 j = p.nil? ? 0 : indent(p.value) 8 9 [ 10 (i > 0) ? 'T' : 'F', 11 (i < j) ? '-' : (i > j) ? '+' : '=', 12 ] 13 end