Sha256: f5f35e228d405ef75a543df8588fc53e34a13d68632d375aabd637114e0ecc51

Contents?: true

Size: 357 Bytes

Versions: 4

Compression:

Stored size: 357 Bytes

Contents

# frozen_string_literal: true

module Consent
  class Action # :nodoc:
    attr_reader :key, :label, :options

    def initialize(key, label, options = {})
      @key = key
      @label = label
      @options = options
    end

    def view_keys
      @options.fetch(:views, [])
    end

    def default_view
      @options[:default_view]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
consent-1.0.0 lib/consent/action.rb
consent-0.6.0 lib/consent/action.rb
consent-0.5.2 lib/consent/action.rb
consent-0.5.0 lib/consent/action.rb