Class: RedCard::Engine
- Inherits:
-
Object
- Object
- RedCard::Engine
- Defined in:
- lib/redcard/engine.rb
Instance Method Summary collapse
-
#initialize(engine, candidate) ⇒ Engine
constructor
A new instance of Engine.
- #valid? ⇒ Boolean
Constructor Details
#initialize(engine, candidate) ⇒ Engine
Returns a new instance of Engine.
3 4 5 6 |
# File 'lib/redcard/engine.rb', line 3 def initialize(engine, candidate) @engine = engine.to_s @candidate = candidate.to_s end |
Instance Method Details
#valid? ⇒ Boolean
8 9 10 11 12 13 14 15 |
# File 'lib/redcard/engine.rb', line 8 def valid? case @engine when "rbx" @candidate == "rbx" or @candidate == "rubinius" else @candidate == @engine end end |