Class: FluentConditions::FluentAccessorMethod
- Inherits:
-
Object
- Object
- FluentConditions::FluentAccessorMethod
- Defined in:
- lib/fluent_conditions/accessor_definers.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ FluentAccessorMethod
constructor
A new instance of FluentAccessorMethod.
- #negative_check ⇒ Object
- #negative_check_with_result ⇒ Object
- #positive_check ⇒ Object
- #positive_check_with_result ⇒ Object
Constructor Details
#initialize(name) ⇒ FluentAccessorMethod
Returns a new instance of FluentAccessorMethod.
15 16 17 |
# File 'lib/fluent_conditions/accessor_definers.rb', line 15 def initialize(name) @name = name end |
Instance Method Details
#negative_check ⇒ Object
23 24 25 |
# File 'lib/fluent_conditions/accessor_definers.rb', line 23 def negative_check "not_#{@name}" end |
#negative_check_with_result ⇒ Object
31 32 33 |
# File 'lib/fluent_conditions/accessor_definers.rb', line 31 def negative_check_with_result "not_#{@name}?" end |
#positive_check ⇒ Object
19 20 21 |
# File 'lib/fluent_conditions/accessor_definers.rb', line 19 def positive_check @name end |
#positive_check_with_result ⇒ Object
27 28 29 |
# File 'lib/fluent_conditions/accessor_definers.rb', line 27 def positive_check_with_result "#{@name}?" end |