mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge pull request #2776 from humzashah/minor-code-improvements
minor code improvements
This commit is contained in:
@@ -13,8 +13,8 @@ class << Linguist
|
|||||||
def instrument(*args, &bk)
|
def instrument(*args, &bk)
|
||||||
if instrumenter
|
if instrumenter
|
||||||
instrumenter.instrument(*args, &bk)
|
instrumenter.instrument(*args, &bk)
|
||||||
else
|
elsif block_given?
|
||||||
yield if block_given?
|
yield
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ module Linguist
|
|||||||
protected
|
protected
|
||||||
|
|
||||||
# Returns true if the attribute is present and not the string "false".
|
# Returns true if the attribute is present and not the string "false".
|
||||||
def boolean_attribute(attr)
|
def boolean_attribute(attribute)
|
||||||
attr != "false"
|
attribute != "false"
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_blob!
|
def load_blob!
|
||||||
|
|||||||
Reference in New Issue
Block a user