lib/comfan.rb in comfan-0.1.0 vs lib/comfan.rb in comfan-0.1.1

- old
+ new

@@ -2,11 +2,11 @@ module Comfan extend self def api_id input_id - return input_id if input_id.length >= 18 + return input_id if input_id.nil? || input_id.length >= 18 suffix = '' 3.times do |i| flags = 0 5.times do |j| @@ -19,10 +19,10 @@ end input_id + suffix end def ui_id input_id - return input_id if input_id.length <= 15 + return input_id if input_id.nil? || input_id.length <= 15 input_id[0..-4] end end \ No newline at end of file