Class: Glimmer::DSL::CSS::MediaExpression
- Inherits:
-
StaticExpression
- Object
- StaticExpression
- Glimmer::DSL::CSS::MediaExpression
- Includes:
- ParentExpression
- Defined in:
- lib/glimmer/dsl/css/media_expression.rb
Instance Method Summary collapse
- #can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
- #interpret(parent, keyword, *args, &block) ⇒ Object
Instance Method Details
#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
34 35 36 37 38 39 |
# File 'lib/glimmer/dsl/css/media_expression.rb', line 34 def can_interpret?(parent, keyword, *args, &block) super(parent, keyword, *args, &block) and parent.is_a?(Glimmer::CSS::StyleSheet) and block_given? and !args.empty? end |
#interpret(parent, keyword, *args, &block) ⇒ Object
41 42 43 |
# File 'lib/glimmer/dsl/css/media_expression.rb', line 41 def interpret(parent, keyword, *args, &block) Glimmer::CSS::MediaQuery.new(args.first.to_s, parent: parent) end |