Class: Eg::AllPairs::Item
- Inherits:
-
Object
- Object
- Eg::AllPairs::Item
- Defined in:
- lib/eg/all_pairs.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#rank ⇒ Object
Returns the value of attribute rank.
-
#var ⇒ Object
Returns the value of attribute var.
Instance Method Summary collapse
- #file ⇒ Object
-
#initialize(v, i, n) ⇒ Item
constructor
A new instance of Item.
- #is_fit?(slug) ⇒ Boolean
Constructor Details
#initialize(v, i, n) ⇒ Item
Returns a new instance of Item.
141 142 143 |
# File 'lib/eg/all_pairs.rb', line 141 def initialize v, i, n @var, @index, @rank = v, i, n end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
140 141 142 |
# File 'lib/eg/all_pairs.rb', line 140 def index @index end |
#rank ⇒ Object
Returns the value of attribute rank.
140 141 142 |
# File 'lib/eg/all_pairs.rb', line 140 def rank @rank end |
#var ⇒ Object
Returns the value of attribute var.
139 140 141 |
# File 'lib/eg/all_pairs.rb', line 139 def var @var end |
Instance Method Details
#file ⇒ Object
144 |
# File 'lib/eg/all_pairs.rb', line 144 def file; var.files[@index]; end |
#is_fit?(slug) ⇒ Boolean
145 146 147 |
# File 'lib/eg/all_pairs.rb', line 145 def is_fit? slug slug[var.index].nil? or slug[var.index] == self end |