Commit 6bbdfa3a authored by Fabio Pelosin's avatar Fabio Pelosin

[Specification] Show the spec for top level attributes informative.

parent 15540df3
......@@ -58,7 +58,7 @@ module Pod
# be passed to initalize the value
def self.top_attr_writer(attr, init_lambda = nil)
define_method("#{attr}=") do |value|
raise Informative, "Can't set `#{attr}' for subspecs." if @parent
raise Informative, "#{self.inspect} Can't set `#{attr}' for subspecs." if @parent
instance_variable_set("@#{attr}", init_lambda ? init_lambda.call(value) : value);
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment