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.



25
26
27
28
# File 'lib/kameleoon/data/data.rb', line 25

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

Instance Attribute Details

#instanceObject (readonly)

Returns the value of attribute instance.



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

def instance
  @instance
end

#sentObject (readonly)

Returns the value of attribute sent.



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

def sent
  @sent
end

Instance Method Details

#mark_as_sentObject



34
35
36
37
# File 'lib/kameleoon/data/data.rb', line 34

def mark_as_sent
  @sent = true
  @nonce = nil
end

#obtain_full_post_text_lineObject

Raises:

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


30
31
32
# File 'lib/kameleoon/data/data.rb', line 30

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