aboutsummaryrefslogtreecommitdiff
path: root/src/guff/post.cr
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-09 01:13:48 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-09 01:13:48 -0500
commit6e02499111871aa59042fc30e57b522f18be6e22 (patch)
tree21e7d2a85b5c039ff700fe6ea2f5ac25d1a08f21 /src/guff/post.cr
parent804b034691f4c276090ee0d2a681dbf5b8b5a267 (diff)
downloadold-guff-6e02499111871aa59042fc30e57b522f18be6e22.tar.bz2
old-guff-6e02499111871aa59042fc30e57b522f18be6e22.zip
add /tags support
Diffstat (limited to 'src/guff/post.cr')
-rw-r--r--src/guff/post.cr4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/guff/post.cr b/src/guff/post.cr
index 703ed55..3a63163 100644
--- a/src/guff/post.cr
+++ b/src/guff/post.cr
@@ -14,6 +14,10 @@ class Guff::Post
}).to_json(io)
end
+ def name : String
+ @row["name"] as String
+ end
+
private def tags : Array(String)
@tags ||= if @row.has_key?("tags") && (@row["tags"] as String).size > 0
(@row["tags"] as String).split('|')