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.
341 342 343 |
# File 'lib/ar-extensions/extensions.rb', line 341 def initialize( fieldname, negate=false ) @fieldname, @negate = fieldname, negate end |
Instance Attribute Details
#fieldname ⇒ Object (readonly)
Returns the value of attribute fieldname.
339 340 341 |
# File 'lib/ar-extensions/extensions.rb', line 339 def fieldname @fieldname end |
#negate ⇒ Object (readonly)
Returns the value of attribute negate.
339 340 341 |
# File 'lib/ar-extensions/extensions.rb', line 339 def negate @negate end |
Instance Method Details
#negate? ⇒ Boolean
345 346 347 |
# File 'lib/ar-extensions/extensions.rb', line 345 def negate? negate ? true : false end |