Module: Reviewer::Conversions
- Included in:
- Command, Reviewer::Command::String
- Defined in:
- lib/reviewer/conversions.rb
Overview
Conversion functions for special types in Reviewer
Class Method Summary collapse
-
.Tool(value) ⇒ Object
rubocop:disable Naming/MethodName.
Class Method Details
.Tool(value) ⇒ Object
rubocop:disable Naming/MethodName
6 7 8 9 10 11 12 13 |
# File 'lib/reviewer/conversions.rb', line 6 def Tool(value) # rubocop:disable Naming/MethodName case value when Tool then value when Symbol then Tool.new(value) when String then Tool.new(value.to_sym) else raise TypeError, "Cannot convert #{value} to Tool" end end |