Sha256: 41707616818b50e6e13267a9ed8e6747a024fd2b2cd99eb5f341bd4c2816ede1

Contents?: true

Size: 595 Bytes

Versions: 9

Compression:

Stored size: 595 Bytes

Contents

require 'notification-handler'
require 'active_support'

module NotificationRenderer
    module NotificationLibrary

        extend ActiveSupport::Concern

        included do
            include NotificationRenderer::NotificationLibrary::InstanceMethods
        end

        module InstanceMethods

            def self.grouping group_by
                group_by{ |notification| notification.send(group_by) }
            end

            def type
                self[:type] || NotificationRenderer.configuration.default_type
            end

        end

    end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
notification-renderer-1.2.3 lib/notification_renderer/notification_library.rb
notification-renderer-1.2.2 lib/notification_renderer/notification_library.rb
notification-renderer-1.2.1 lib/notification_renderer/notification_library.rb
notification-renderer-1.2.0 lib/notification_renderer/notification_library.rb
notification-renderer-1.1.2 lib/notification_renderer/notification_library.rb
notification-renderer-1.1.1 lib/notification_renderer/notification_library.rb
notification-renderer-1.1.0 lib/notification_renderer/notification_library.rb
notification-renderer-1.0.0 lib/notification_renderer/notification_library.rb
notification-renderer-1.0.0.beta11 lib/notification_renderer/notification_library.rb