Class: Windows::Units::Recognizer::Formats::Percent
- Defined in:
- lib/windows/units/recognizer.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#match ⇒ Object
match 50px, 50PX, 50.5px, 50.1PX.
Methods inherited from Base
Instance Method Details
#match ⇒ Object
match 50px, 50PX, 50.5px, 50.1PX
36 37 38 39 40 41 |
# File 'lib/windows/units/recognizer.rb', line 36 def match return false unless el.respond_to?(:match) data = el.match(/(^[\d.]+)(%)/i) return_match(self, data) { @unit = Float(data[1]) } end |