Class: Kameleoon::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/kameleoon/data/data.rb

Overview

Represents base class for any Kameleoon data

Direct Known Subclasses

DuplicationSafeData, DuplicationUnsafeData

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_type) ⇒ Data

Returns a new instance of Data.



23
24
25
26
# File 'lib/kameleoon/data/data.rb', line 23

def initialize(data_type)
  @instance = data_type
  @sent = false
end

Instance Attribute Details

#instanceObject (readonly)

Returns the value of attribute instance.



21
22
23
# File 'lib/kameleoon/data/data.rb', line 21

def instance
  @instance
end

#sentObject (readonly)

Returns the value of attribute sent.



21
22
23
# File 'lib/kameleoon/data/data.rb', line 21

def sent
  @sent
end

Instance Method Details

#mark_as_sentObject



32
33
34
35
# File 'lib/kameleoon/data/data.rb', line 32

def mark_as_sent
  @sent = true
  @nonce = nil
end

#obtain_full_post_text_lineObject

Raises:

  • (KameleoonError.new('ToDo: implement this method.'))


28
29
30
# File 'lib/kameleoon/data/data.rb', line 28

def obtain_full_post_text_line
  raise KameleoonError.new('ToDo: implement this method.'), 'ToDo: implement this method.'
end