Sha256: f51fc1fff9e9fa157335f1d631967feec9d1288a270efa3a7ae42a5166338b25

Contents?: true

Size: 358 Bytes

Versions: 10

Compression:

Stored size: 358 Bytes

Contents

module FDE
  module Slack
    class Footer
      attr_accessor :value, :icon

      def initialize(value, icon = nil)
        @value = value
        @icon = icon
      end

      def to_h
        hash = {}
        hash[:footer] = @value
        hash[:footer_icon] = @icon if @icon
        hash
      end

      alias_method :to_hash, :to_h
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fde-slack-notification-1.3.2 lib/slack/footer.rb
fde-slack-notification-1.3.1 lib/slack/footer.rb
fde-slack-notification-1.2.1 lib/slack/footer.rb
fde-slack-notification-1.2.0 lib/slack/footer.rb
fde-slack-notification-1.1.1 lib/slack/footer.rb
fde-slack-notification-1.1.0 lib/slack/footer.rb
fde-slack-notification-0.3.0 lib/slack/footer.rb
fde-slack-notification-1.0.0 lib/slack/footer.rb
fde-slack-notification-0.2.0 lib/slack/footer.rb
fde-slack-notification-0.1.0 lib/slack/footer.rb