Class: CSSPool::CSS::MediaQuery

Inherits:
Node
  • Object
show all
Defined in:
lib/csspool/css/media_query.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#inner_end_pos, #inner_start_pos, #outer_end_pos, #outer_start_pos

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #accept, #children, #each, #hash, #to_css, #to_minified_css

Constructor Details

#initialize(only_or_not, media_expr, and_exprs, parse_location = {}) ⇒ MediaQuery

Returns a new instance of MediaQuery.



11
12
13
14
15
16
# File 'lib/csspool/css/media_query.rb', line 11

def initialize(only_or_not, media_expr, and_exprs, parse_location = {})
  @only_or_not = only_or_not
  @media_expr = media_expr
  @and_exprs = and_exprs
  @parse_location = parse_location
end

Instance Attribute Details

#and_exprsObject

Returns the value of attribute and_exprs.



4
5
6
# File 'lib/csspool/css/media_query.rb', line 4

def and_exprs
  @and_exprs
end

#media_exprObject

Returns the value of attribute media_expr.



4
5
6
# File 'lib/csspool/css/media_query.rb', line 4

def media_expr
  @media_expr
end

#only_or_notObject

Returns the value of attribute only_or_not.



4
5
6
# File 'lib/csspool/css/media_query.rb', line 4

def only_or_not
  @only_or_not
end

#parse_locationObject

Returns the value of attribute parse_location.



5
6
7
# File 'lib/csspool/css/media_query.rb', line 5

def parse_location
  @parse_location
end

Class Method Details

.emptyObject



7
8
9
# File 'lib/csspool/css/media_query.rb', line 7

def self.empty
  new(nil, nil, [])
end