Class: CSSPool::Selectors::Attribute

Inherits:
Additional show all
Defined in:
lib/csspool/selectors/attribute.rb

Constant Summary collapse

NO_MATCH =
0
SET =
1
EQUALS =
2
INCLUDES =
3
DASHMATCH =
4
PREFIXMATCH =
5
SUFFIXMATCH =
6
SUBSTRINGMATCH =
7

Instance Attribute Summary collapse

Attributes inherited from Node

#inner_end_pos, #inner_start_pos, #outer_end_pos, #outer_start_pos

Instance Method Summary collapse

Methods inherited from Node

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

Constructor Details

#initialize(name, value, match_way, namespace = nil) ⇒ Attribute

Returns a new instance of Attribute.



18
19
20
21
22
23
# File 'lib/csspool/selectors/attribute.rb', line 18

def initialize name, value, match_way, namespace = nil
  @name = name
  @value = value
  @match_way = match_way
  @namespace = namespace
end

Instance Attribute Details

#match_wayObject

Returns the value of attribute match_way.



6
7
8
# File 'lib/csspool/selectors/attribute.rb', line 6

def match_way
  @match_way
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/csspool/selectors/attribute.rb', line 4

def name
  @name
end

#namespaceObject

Returns the value of attribute namespace.



7
8
9
# File 'lib/csspool/selectors/attribute.rb', line 7

def namespace
  @namespace
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/csspool/selectors/attribute.rb', line 5

def value
  @value
end