Class: Kameleoon::Data

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

Direct Known Subclasses

Browser, Conversion, CustomData, Device, PageView

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Data

Returns a new instance of Data.

Raises:

  • (KameleoonError)


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

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

Instance Attribute Details

#instanceObject

Returns the value of attribute instance.



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

def instance
  @instance
end

#sentObject

Returns the value of attribute sent.



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

def sent
  @sent
end

Instance Method Details

#encode(url) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/kameleoon/data.rb', line 40

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)


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

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