diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-03-08 00:01:21 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-03-08 00:01:21 -0500 |
commit | 2d6635b4ff0393af6d97b93772bc566c331de08e (patch) | |
tree | 9cd8239047b1f6549dcb5883084e25b3f655322e /src/guff/post.cr | |
parent | b8a4926107f273c1606a026687ebfcc74da147d4 (diff) | |
download | old-guff-2d6635b4ff0393af6d97b93772bc566c331de08e.tar.bz2 old-guff-2d6635b4ff0393af6d97b93772bc566c331de08e.zip |
add Post wrapper
Diffstat (limited to 'src/guff/post.cr')
-rw-r--r-- | src/guff/post.cr | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/guff/post.cr b/src/guff/post.cr new file mode 100644 index 0000000..7247e15 --- /dev/null +++ b/src/guff/post.cr @@ -0,0 +1,10 @@ +class Guff:Post + def initialize(@row : Hash(String, ::SQLite3::Value)) + end + + def to_json + @row.merge({ + "tags": @row["tags"].split('|') + }).to_json + end +end |