Sha256: d3ff3f59ba535395acf77b032dd4ad5a7f16b98475dd63101c323571d925fb14

Contents?: true

Size: 507 Bytes

Versions: 11

Compression:

Stored size: 507 Bytes

Contents

require 'glimmer/dsl/expression'

module Glimmer
  module DSL
    class PropertyExpression < Expression
      def can_interpret?(parent, keyword, *args, &block)
        block.nil? and
          args.size > 0 and
          parent.respond_to?(:set_attribute) and
          parent.respond_to?(:has_attribute?) and
          parent.has_attribute?(keyword, *args)
      end

      def interpret(parent, keyword, *args, &block)
        parent.set_attribute(keyword, *args)
        nil
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
glimmer-0.5.11 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.10 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.9 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.8 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.7 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.6 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.5 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.4 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.3 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.2 lib/glimmer/dsl/property_expression.rb
glimmer-0.5.0 lib/glimmer/dsl/property_expression.rb