Class: Sexp
- Inherits:
-
Object
- Object
- Sexp
- Defined in:
- lib/ruby_parser_extras.rb
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
- #paren ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#comments ⇒ Object
Returns the value of attribute comments.
700 701 702 |
# File 'lib/ruby_parser_extras.rb', line 700 def comments @comments end |
#paren ⇒ Object
706 707 708 |
# File 'lib/ruby_parser_extras.rb', line 706 def paren @paren ||= false end |
Instance Method Details
#node_type ⇒ Object
702 703 704 |
# File 'lib/ruby_parser_extras.rb', line 702 def node_type first end |
#to_sym ⇒ Object
715 716 717 |
# File 'lib/ruby_parser_extras.rb', line 715 def to_sym self.value.to_sym end |
#value ⇒ Object
710 711 712 713 |
# File 'lib/ruby_parser_extras.rb', line 710 def value raise "multi item sexp" if size > 2 last end |
#values ⇒ Object
719 720 721 |
# File 'lib/ruby_parser_extras.rb', line 719 def values self[1..-1] end |