Class: Windows::Units::Recognizer::Formats::Base
- Inherits:
-
Struct
- Object
- Struct
- Windows::Units::Recognizer::Formats::Base
- Defined in:
- lib/windows/units/recognizer.rb
Instance Attribute Summary collapse
-
#el ⇒ Object
Returns the value of attribute el.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
Instance Attribute Details
#el ⇒ Object
Returns the value of attribute el
5 6 7 |
# File 'lib/windows/units/recognizer.rb', line 5 def el @el end |
#unit ⇒ Object
Returns the value of attribute unit.
6 7 8 |
# File 'lib/windows/units/recognizer.rb', line 6 def unit @unit end |
Instance Method Details
#format ⇒ Object
12 13 14 |
# File 'lib/windows/units/recognizer.rb', line 12 def format self.class.to_s.split("::").last.downcase.to_sym end |
#match ⇒ Object
8 9 10 |
# File 'lib/windows/units/recognizer.rb', line 8 def match raise "you should implement your match" end |
#return_match(matcher, data, &block) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/windows/units/recognizer.rb', line 16 def return_match(matcher, data,&block) data = if data matcher.instance_eval &block matcher else nil end end |