mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Raise an error is Language#name is missing
This commit is contained in:
@@ -43,7 +43,7 @@ module Linguist
|
||||
attr_reader :name, :extensions
|
||||
|
||||
def initialize(attributes = {})
|
||||
@name = attributes[:name]
|
||||
@name = attributes[:name] || raise(ArgumentError, "missing name")
|
||||
@extensions = attributes[:extensions] || []
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user