Sha256: b4f3e4771b51d6869e5b013e6f53da3c7d01cea7cef6fa170d0b8e7739a08022

Contents?: true

Size: 235 Bytes

Versions: 4

Compression:

Stored size: 235 Bytes

Contents

module Yoda
  module AST
    class WhenNode < Node
      # @return [Array<Node>]
      def matchers
        children.slice(0..-2) || []
      end

      # @return [Node]
      def body
        children.last
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 lib/yoda/ast/when_node.rb
yoda-language-server-0.10.0 lib/yoda/ast/when_node.rb
yoda-language-server-0.9.0 lib/yoda/ast/when_node.rb
yoda-language-server-0.8.0 lib/yoda/ast/when_node.rb