lib/origen/features.rb in origen-0.60.7 vs lib/origen/features.rb in origen-0.60.8
- old
+ new
@@ -25,11 +25,11 @@
unless options.key?(:description)
@file = define_file(caller[0])
options[:description] = fetch_description(name)
end
features[name] = Feature.new(name, options)
- else # if feature with given name already exists
+ else # if feature with given name already exists
fail "Feature #{name} already added!"
end
end
def fetch_description(name)
@@ -70,20 +70,18 @@
end
end
end
end
- public
-
def has_features?(name = nil)
if !name
if feature.size == 0
- return false
+ false
else
- return true
+ true
end
else
- return feature.include?(name)
+ feature.include?(name)
end
end
alias_method :has_feature?, :has_features?
# Returns an array of the names of all associated features