Sha256: b859ea0e57fa29a8b80a4a0599a143442737b351cd28d873a9a52b368c9c1ce2

Contents?: true

Size: 536 Bytes

Versions: 7

Compression:

Stored size: 536 Bytes

Contents

require 'glimmer/dsl/expression'
require 'glimmer/dsl/parent_expression'
require 'glimmer/opal/input_proxy'

module Glimmer
  module DSL
    module Opal
      class TextExpression < Expression
        include ParentExpression

        def can_interpret?(parent, keyword, *args, &block)
          keyword == 'text' and parent and block_given?
        end

        def interpret(parent, keyword, *args, &block)
          args << {type: 'text'}
          Glimmer::Opal::InputProxy.new(parent, args)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
glimmer-dsl-opal-0.0.9 lib/glimmer/dsl/opal/text_expression.rb
glimmer-dsl-opal-0.0.8 lib/glimmer/dsl/opal/text_expression.rb
glimmer-dsl-opal-0.0.7 lib/glimmer/dsl/opal/text_expression.rb
glimmer-dsl-opal-0.0.6 lib/glimmer/dsl/opal/text_expression.rb
glimmer-dsl-opal-0.0.5 lib/glimmer/dsl/opal/text_expression.rb
glimmer-dsl-opal-0.0.4 lib/glimmer/dsl/opal/text_expression.rb
glimmer-dsl-opal-0.0.3 lib/glimmer/dsl/opal/text_expression.rb