# File lib/deltacloud/base_driver/features.rb, line 126 def self.feature(collection, name, &block) features[collection] ||= [] if f = features[collection].find { |f| f.name == name } f.instance_eval(&block) if block_given? return f end unless decl = feature_decl_for(collection, name) raise UndeclaredFeatureError, "No feature #{name} for #{collection}" end features[collection] << Feature.new(decl, &block) end