Sha256: 0e98fab4eb4843cff7cacc2e5204d0ea3077e7ed4a62c83065af73e9256acca3

Contents?: true

Size: 662 Bytes

Versions: 183

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbHashtag
    class Hashtag < Playbook::KitBase
      prop :text
      prop :type, type: Playbook::Props::Enum,
                  values: %w[default project home appointment],
                  default: "default"
      prop :url

      def classname
        generate_classname("pb_hastag_kit")
      end

      def hashtag_text
        type_text + text
      end

    private

      def type_text
        if type === "home"
          "H#"
        elsif type === "project"
          "P#"
        elsif type === "appointment"
          "A#"
        else
          "#"
        end
      end
    end
  end
end

Version data entries

183 entries across 183 versions & 1 rubygems

Version Path
playbook_ui-11.4.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.3.0.pre.alpha2 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.3.0.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.3.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.7 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.6 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.5 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.4 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.4.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.3 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.2 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.2.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.1.2 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.1.2.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.1.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.1.1.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.1.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.0.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.0.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb