Class: Gemika::Matrix::Row

Inherits:
Object
  • Object
show all
Defined in:
lib/gemika/matrix.rb

Overview

A row in the test matrix

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Row

Returns a new instance of Row.



15
16
17
18
# File 'lib/gemika/matrix.rb', line 15

def initialize(attrs)
  @ruby = attrs.fetch(:ruby)
  @gemfile = attrs.fetch(:gemfile)
end

Instance Attribute Details

#gemfileObject (readonly)

The path to the gemfile for the row.



28
29
30
# File 'lib/gemika/matrix.rb', line 28

def gemfile
  @gemfile
end

#rubyObject (readonly)

The Ruby version for the row.



23
24
25
# File 'lib/gemika/matrix.rb', line 23

def ruby
  @ruby
end

Instance Method Details

#compatible_with_ruby?(current_ruby = Env.ruby) ⇒ Boolean

Returns whether this row can be run with the given Ruby version.

Returns:

  • (Boolean)


33
34
35
# File 'lib/gemika/matrix.rb', line 33

def compatible_with_ruby?(current_ruby = Env.ruby)
  ruby == current_ruby
end