Method: Dict::Dictionary#check_arguments

Defined in:
lib/dict/dictionary.rb

#check_arguments(word) ⇒ Object

Checks if word was given correctly.

Raises:

  • (ArgumentError)


22
23
24
# File 'lib/dict/dictionary.rb', line 22

def check_arguments(word)
  raise ArgumentError.new("No given word") if word.empty?
end