whitespace and code style

This commit is contained in:
Torsten Ruger
2016-12-30 19:17:15 +02:00
parent db798d1a4a
commit 83b6628f1a
6 changed files with 12 additions and 11 deletions

View File

@ -122,8 +122,7 @@ module Typed
raise "create_method #{type.inspect} is not a Type" unless type.is_a? Parfait::Type
raise "Args must be Hash #{args}" unless args.is_a?(Hash)
raise "create_method #{method_name}.#{method_name.class}" unless method_name.is_a? Symbol
arguments = Parfait::Type.for_hash( type.object_class , args )
@method = type.create_method( method_name , arguments)
@method = type.create_method( method_name , args)
self
end

View File

@ -211,7 +211,7 @@ module Parfait
# Word from string
def self.new_word( string )
string = string.to_s if string.is_a? Symbol
word = Parfait::Word.new( string.length )
word = Word.new( string.length )
string.codepoints.each_with_index do |code , index |
word.set_char(index + 1 , code)
end