Class: RubyEventStore::Mappers::ForgottenData

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_event_store/mappers/forgotten_data.rb

Constant Summary collapse

FORGOTTEN_DATA =
"FORGOTTEN_DATA".freeze

Instance Method Summary collapse

Constructor Details

#initialize(string = FORGOTTEN_DATA) ⇒ ForgottenData

Returns a new instance of ForgottenData.



8
9
10
# File 'lib/ruby_event_store/mappers/forgotten_data.rb', line 8

def initialize(string = FORGOTTEN_DATA)
  @string = string
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missingObject



21
22
23
# File 'lib/ruby_event_store/mappers/forgotten_data.rb', line 21

def method_missing(*)
  self
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



16
17
18
# File 'lib/ruby_event_store/mappers/forgotten_data.rb', line 16

def ==(other)
  @string == other
end

#respond_to_missing?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/ruby_event_store/mappers/forgotten_data.rb', line 25

def respond_to_missing?(*)
  true
end

#to_sObject



12
13
14
# File 'lib/ruby_event_store/mappers/forgotten_data.rb', line 12

def to_s
  @string
end