File: tag.rb

package info (click to toggle)
mikutter 5.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 9,780 kB
  • sloc: ruby: 22,912; sh: 186; makefile: 21
file content (21 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Plugin::Mastodon
  # https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#tag
  class Tag < Diva::Model
    register :mastodon_tag, name: Plugin[:mastodon]._('Mastodonă‚¿ă‚°')

    field.string :name, required: true
    field.uri :url, required: true

    def description
      "##{name}"
    end

    def path
      "/#{name}"
    end

    def inspect
      "mastodon-tag(#{name})"
    end
  end
end