Module: Resistor

Defined in:
lib/resistor.rb,
lib/resistor/options.rb,
lib/resistor/version.rb,
lib/resistor/color_code.rb,
lib/resistor/basic_resistor.rb,
lib/resistor/combined_resistor.rb

Defined Under Namespace

Modules: ColorCode Classes: BasicResistor, CombinedResistor, Options

Constant Summary collapse

VERSION =
"1.1.1"

Class Method Summary collapse

Class Method Details

.new(arg, options = {}) ⇒ Resistor::BasicResistor

Alias for Resistor::BasicResistor.new

Examples:

Create a Resistor::BasicResistor object.

r1 = Resistor.new(20)
r2 = Resistor.new(['yellow', 'purple', 'red', 'gold'])

Returns:

See Also:



17
18
19
# File 'lib/resistor.rb', line 17

def new(arg, options = {})
  Resistor::BasicResistor.new(arg, options)
end