Class: TestIds::Configuration::Item
- Inherits:
-
Object
- Object
- TestIds::Configuration::Item
- Defined in:
- lib/test_ids/configuration.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#include ⇒ Object
Returns the value of attribute include.
Instance Method Summary collapse
- #callback(&block) ⇒ Object
- #empty? ⇒ Boolean
- #freeze ⇒ Object
- #function? ⇒ Boolean
-
#initialize ⇒ Item
constructor
A new instance of Item.
Constructor Details
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
4 5 6 |
# File 'lib/test_ids/configuration.rb', line 4 def algorithm @algorithm end |
#exclude ⇒ Object
Returns the value of attribute exclude.
4 5 6 |
# File 'lib/test_ids/configuration.rb', line 4 def exclude @exclude end |
#include ⇒ Object
Returns the value of attribute include.
4 5 6 |
# File 'lib/test_ids/configuration.rb', line 4 def include @include end |
Instance Method Details
#callback(&block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/test_ids/configuration.rb', line 11 def callback(&block) if block_given? @callback = block else @callback end end |
#empty? ⇒ Boolean
19 20 21 |
# File 'lib/test_ids/configuration.rb', line 19 def empty? include.empty? && exclude.empty? && !algorithm && !callback end |
#freeze ⇒ Object
27 28 29 30 31 |
# File 'lib/test_ids/configuration.rb', line 27 def freeze @include.freeze @exclude.freeze super end |
#function? ⇒ Boolean
23 24 25 |
# File 'lib/test_ids/configuration.rb', line 23 def function? !!algorithm || !!callback end |