Sha256: e5990689bf90493460fabf0f79558cb258e3b3b2e55dfdbc0fe9d946b314ea34

Contents?: true

Size: 725 Bytes

Versions: 17

Compression:

Stored size: 725 Bytes

Contents

module Unparser
  class Emitter
    class Literal
      # Emitter for execute strings (xstr) nodes
      class ExecuteString < self

        OPEN = CLOSE = '`'.freeze

        handle :xstr

      private

        # Perform dispatch
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          parentheses(OPEN, CLOSE) do
            visit(dynamic_body)
          end
        end

        # Return dynamic body
        #
        # @return [Parser::AST::Node]
        #
        # @api private
        #
        def dynamic_body
          Parser::AST::Node.new(:dyn_xstr_body, children)
        end

      end # ExecuteString
    end # Literal
  end # Emitter
end # Unparser

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
unparser-0.1.0 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.18 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.16 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.15 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.14 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.13 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.12 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.11 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.10 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.8 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.7 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.6 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.5 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.4 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.3 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.2 lib/unparser/emitter/literal/execute_string.rb
unparser-0.0.1 lib/unparser/emitter/literal/execute_string.rb