Method: Sexp#key
- Defined in:
- lib/code_analyzer/sexp.rb
#key ⇒ Object
Get the hash key
s(:assoc_new, s(:@label, "first_name:", s(1, 1)), s(:string_literal, s(:string_add, s(:string_content), s(:@tstring_content, "Richard", s(1, 14)))))
=>
s(:@label, "first_name:", s(1, 1))
696 697 698 699 700 |
# File 'lib/code_analyzer/sexp.rb', line 696 def key if :assoc_new == sexp_type self[1].to_s end end |