lib/udgenerator.rb in udgenerator-1.0.6 vs lib/udgenerator.rb in udgenerator-1.1.0
- old
+ new
@@ -118,10 +118,10 @@
arrType.each_pair{|s, d| result += struct(s) + "\n"}
result
end
def swift_get_sets(arrType, fileName)
result = ""
- arrType.each_pair{|s, d| result += "\n #{swift_getter(s, d)} {\n return get(#{fileName}Register.#{s}) as #{d.swift_type_name}\n }\n #{swift_setter(s, d)} {\n set(#{s}, forKey: #{fileName}Register.#{s})\n }\n"}
+ arrType.each_pair{|s, d| result += "\n #{swift_getter(s, d)} {\n return get(#{fileName}Register.#{s}) as! #{d.swift_type_name}\n }\n #{swift_setter(s, d)} {\n set(#{s}, forKey: #{fileName}Register.#{s})\n }\n"}
result
end
end
end