Class: ActiveRecord::Extensions::RegexpBase::RegexpResult
- Inherits:
-
Object
- Object
- ActiveRecord::Extensions::RegexpBase::RegexpResult
- Defined in:
- lib/ar-extensions/extensions.rb
Overview
A result class which provides an easy interface.
Instance Attribute Summary collapse
-
#fieldname ⇒ Object
readonly
Returns the value of attribute fieldname.
-
#negate ⇒ Object
readonly
Returns the value of attribute negate.
Instance Method Summary collapse
-
#initialize(fieldname, negate = false) ⇒ RegexpResult
constructor
A new instance of RegexpResult.
- #negate? ⇒ Boolean
Constructor Details
#initialize(fieldname, negate = false) ⇒ RegexpResult
Returns a new instance of RegexpResult.
343 344 345 |
# File 'lib/ar-extensions/extensions.rb', line 343 def initialize( fieldname, negate=false ) @fieldname, @negate = fieldname, negate end |
Instance Attribute Details
#fieldname ⇒ Object (readonly)
Returns the value of attribute fieldname.
341 342 343 |
# File 'lib/ar-extensions/extensions.rb', line 341 def fieldname @fieldname end |
#negate ⇒ Object (readonly)
Returns the value of attribute negate.
341 342 343 |
# File 'lib/ar-extensions/extensions.rb', line 341 def negate @negate end |
Instance Method Details
#negate? ⇒ Boolean
347 348 349 |
# File 'lib/ar-extensions/extensions.rb', line 347 def negate? negate ? true : false end |