Sha256: dab17fb3dc3024d0694aff45d2a5fec2764e57d690f00dfd8fdceb671f01de56

Contents?: true

Size: 546 Bytes

Versions: 10

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

module Stenographer
  class Output < ApplicationRecord
    validates :authentication_id, presence: true
    validates :configuration, presence: true

    belongs_to :authentication, class_name: 'Stenographer::Authentication'

    def configuration_hash
      configuration.present? ? JSON.parse(configuration, symbolize_names: true) : {}
    end

    def filters_hash
      filters.present? ? JSON.parse(filters, symbolize_names: true) : {}
    end

    def provider
      authentication.provider
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
stenographer-rails-0.7.4 app/models/stenographer/output.rb
stenographer-rails-0.7.3 app/models/stenographer/output.rb
stenographer-rails-0.7.1 app/models/stenographer/output.rb
stenographer-rails-0.7.0 app/models/stenographer/output.rb
stenographer-rails-0.6.5 app/models/stenographer/output.rb
stenographer-rails-0.6.4 app/models/stenographer/output.rb
stenographer-rails-0.6.3 app/models/stenographer/output.rb
stenographer-rails-0.6.2 app/models/stenographer/output.rb
stenographer-rails-0.6.1 app/models/stenographer/output.rb
stenographer-rails-0.6.0 app/models/stenographer/output.rb