Class: CSS::Nodes::UnicodeRange
- Inherits:
-
Data
- Object
- Data
- CSS::Nodes::UnicodeRange
- Defined in:
- lib/css/nodes.rb
Overview
An inclusive code-point range, e.g. ‘U+0-7F`. Result of CSS.parse_urange.
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
Instance Method Summary collapse
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first
34 35 36 |
# File 'lib/css/nodes.rb', line 34 def first @first end |
#last ⇒ Object (readonly)
Returns the value of attribute last
34 35 36 |
# File 'lib/css/nodes.rb', line 34 def last @last end |
Instance Method Details
#cover?(cp) ⇒ Boolean
35 |
# File 'lib/css/nodes.rb', line 35 def cover?(cp) = (first..last).cover?(cp) |
#to_s ⇒ Object
37 38 39 |
# File 'lib/css/nodes.rb', line 37 def to_s first == last ? format('U+%X', first) : format('U+%X-%X', first, last) end |