lib/lazydoc/attributes.rb in lazydoc-0.8.0 vs lib/lazydoc/attributes.rb in lazydoc-0.9.0
- old
+ new
@@ -113,12 +113,12 @@
when String, Symbol, Numeric, true, false, nil then key.inspect
else "YAML.load(\'#{YAML.dump(key)}\')"
end
instance_eval %Q{
-def #{symbol}
+def #{symbol}(resolve=true)
comment = const_attrs[#{key}] ||= Subject.new(nil, lazydoc)
- comment.kind_of?(Comment) ? comment.resolve : comment
+ resolve && comment.kind_of?(Comment) ? comment.resolve : comment
end}
instance_eval(%Q{
def #{symbol}=(comment)
const_attrs[#{key}] = comment