Sha256: 1a4fb3fd54c749e00cbfbad0f99f53573e2f66abe2f4d81797475d5da7bd0b0c

Contents?: true

Size: 405 Bytes

Versions: 10

Compression:

Stored size: 405 Bytes

Contents

module FDE
  module Slack
    class Field
      attr_accessor :title,
        :value,
        :short

      def initialize(title, value, short = false)
        @title = title
        @value = value
        @short = short
      end

      def to_h
        {
          title: @title,
          value: @value,
          short: @short
        }
      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/field.rb
fde-slack-notification-1.3.1 lib/slack/field.rb
fde-slack-notification-1.2.1 lib/slack/field.rb
fde-slack-notification-1.2.0 lib/slack/field.rb
fde-slack-notification-1.1.1 lib/slack/field.rb
fde-slack-notification-1.1.0 lib/slack/field.rb
fde-slack-notification-0.3.0 lib/slack/field.rb
fde-slack-notification-1.0.0 lib/slack/field.rb
fde-slack-notification-0.2.0 lib/slack/field.rb
fde-slack-notification-0.1.0 lib/slack/field.rb