Sha256: dfe0dd67c2b1363071e1dc232cf580316867ebc03e1e40fa76d5d7eafd51c0f3

Contents?: true

Size: 436 Bytes

Versions: 1

Compression:

Stored size: 436 Bytes

Contents

# frozen_string_literal: true

module Logux
  class Actions < ::ActionController::Parameters
    def action_name
      type&.split('/')&.dig(0)
    end

    def action_type
      type&.split('/')&.last
    end

    def channel_name
      channel&.split('/')&.dig(0)
    end

    def channel_id
      channel&.split('/')&.last
    end

    def type
      require(:type)
    end

    def channel
      require(:channel)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logux_rails-0.1.0 lib/logux/actions.rb