Class: Kameleoon::Data

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

Direct Known Subclasses

Browser, Conversion, CustomData, Interest, PageView

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Data

Returns a new instance of Data.

Raises:

  • (KameleoonError)


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

def initialize(*args)
  raise KameleoonError.new("Cannot initialise interface.")
end

Instance Attribute Details

#instanceObject

Returns the value of attribute instance.



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

def instance
  @instance
end

#sentObject

Returns the value of attribute sent.



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

def sent
  @sent
end

Instance Method Details

#encode(url) ⇒ Object



32
33
34
35
36
37
38
39
40
41
# File 'lib/kameleoon/data.rb', line 32

def encode(url)
  encoded_url = CGI.escape(url)
  encoded_url.gsub! "%27", "'"
  encoded_url.gsub! "%21", "!"
  encoded_url.gsub! "+", "%20"
  encoded_url.gsub! "%2A", "*"
  encoded_url.gsub! "%28", "("
  encoded_url.gsub! "%29", ")"
  encoded_url
end

#obtain_full_post_text_lineObject

Raises:

  • (KameleoonError)


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

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