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.
-
#size ⇒ Object
Returns the value of attribute size.
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 |
#size ⇒ Object
Returns the value of attribute size.
4 5 6 |
# File 'lib/test_ids/configuration.rb', line 4 def size @size end |
Instance Method Details
#callback(&block) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/test_ids/configuration.rb', line 12 def callback(&block) if block_given? @callback = block else @callback end end |
#empty? ⇒ Boolean
20 21 22 |
# File 'lib/test_ids/configuration.rb', line 20 def empty? include.empty? && exclude.empty? && !algorithm && !callback end |
#freeze ⇒ Object
28 29 30 31 32 |
# File 'lib/test_ids/configuration.rb', line 28 def freeze @include.freeze @exclude.freeze super end |
#function? ⇒ Boolean
24 25 26 |
# File 'lib/test_ids/configuration.rb', line 24 def function? !!algorithm || !!callback end |