Class: Brauser::Definitions::Base
- Inherits:
-
Object
- Object
- Brauser::Definitions::Base
- Defined in:
- lib/brauser/definitions/base.rb
Overview
A class which hold a definition of a browser, a platform or a language.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
The id of the definition.
Instance Method Summary collapse
-
#match(_, *_, **_) ⇒ Object|NilClass
Performs a match of this definition.
Instance Attribute Details
#id ⇒ Object (readonly)
Returns The id of the definition.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/brauser/definitions/base.rb', line 60 class Base attr_reader :id # Performs a match of this definition. # # @return [Object|NilClass] A non falsy value if match succeeded, `false` or `nil` otherwise. def match(_, *_, **_) raise "Must be overridden by a subclass." end end |
Instance Method Details
#match(_, *_, **_) ⇒ Object|NilClass
Performs a match of this definition.
66 67 68 |
# File 'lib/brauser/definitions/base.rb', line 66 def match(_, *_, **_) raise "Must be overridden by a subclass." end |