Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More Docs

  • Loading branch information...
commit 09d18c3ab7eb0ea33257e184d0faf090370609e0 1 parent be4d2c1
@jcla1 authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/hn2json/entity.rb
View
11 lib/hn2json/entity.rb
@@ -78,7 +78,16 @@ def get_attrs
when :error
end
end
-
+
+ # Internal: Yields self for adding attr
+ #
+ # Examples
+ #
+ # entity.add_attrs do |entity|
+ # entity.title = "Hello World!"
+ # end
+ #
+ # Returns nothing.
def add_attrs
yield self
end
Please sign in to comment.
Something went wrong with that request. Please try again.