Class: Glimmer::DSL::CSS::PropertyExpression

Inherits:
Expression
  • Object
show all
Includes:
ParentExpression
Defined in:
lib/glimmer/dsl/css/property_expression.rb

Instance Method Summary collapse

Methods included from ParentExpression

#add_content

Methods inherited from Expression

#add_content, dsl, #textual?, #widget?

Instance Method Details

#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/glimmer/dsl/css/property_expression.rb', line 10

def can_interpret?(parent, keyword, *args, &block)
  parent.is_a?(Glimmer::CSS::RuleSet) and
    !block_given? and
    !args.empty?
end

#interpret(parent, keyword, *args, &block) ⇒ Object



16
17
18
# File 'lib/glimmer/dsl/css/property_expression.rb', line 16

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