Sha256: 3512839d49eaf4b5b86913a0a9b217063584c28ca44d38966d4cabf8ab3ded38
Contents?: true
Size: 601 Bytes
Versions: 12
Compression:
Stored size: 601 Bytes
Contents
require 'glimmer/dsl/expression' require 'glimmer/css/style_sheet' require 'glimmer/css/rule' module Glimmer module DSL module CSS class RuleExpression < Expression include ParentExpression def can_interpret?(parent, keyword, *args, &block) parent.is_a?(Glimmer::CSS::StyleSheet) and block_given? and args.empty? end def interpret(parent, keyword, *args, &block) Glimmer::CSS::Rule.new(keyword.to_s.downcase).tap do |rule| parent.rules << rule end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems