Class: Redaction::Types::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/redaction/types/base.rb

Direct Known Subclasses

Basic, BasicHtml, Email, Html, Name, Phone, Text

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, data) ⇒ Base

Returns a new instance of Base.



10
11
12
13
# File 'lib/redaction/types/base.rb', line 10

def initialize(record, data)
  @record = record
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/redaction/types/base.rb', line 4

def data
  @data
end

#recordObject (readonly)

Returns the value of attribute record.



4
5
6
# File 'lib/redaction/types/base.rb', line 4

def record
  @record
end

Class Method Details

.call(record, data) ⇒ Object



6
7
8
# File 'lib/redaction/types/base.rb', line 6

def self.call(record, data)
  new(record, data).content
end

Instance Method Details

#contentObject



15
16
17
# File 'lib/redaction/types/base.rb', line 15

def content
  "[REDACTED]"
end