Module: Reviewer::Tool::Conversions
- Included in:
- Command
- Defined in:
- lib/reviewer/tool/conversions.rb
Overview
Conversion functions for coercing values to Tool instances
Class Method Summary collapse
-
.Tool(value) ⇒ Tool
Coerces a value into a Tool instance.
Class Method Details
.Tool(value) ⇒ Tool
Coerces a value into a Tool instance
11 12 13 14 15 16 |
# File 'lib/reviewer/tool/conversions.rb', line 11 def Tool(value) # rubocop:disable Naming/MethodName case value in Tool then value else raise TypeError, "Cannot convert #{value.class} to Tool" end end |