Class: Kameleoon::Data
- Inherits:
-
Object
- Object
- Kameleoon::Data
- Defined in:
- lib/kameleoon/data.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#instance ⇒ Object
Returns the value of attribute instance.
-
#sent ⇒ Object
Returns the value of attribute sent.
Instance Method Summary collapse
- #encode(url) ⇒ Object
-
#initialize(*args) ⇒ Data
constructor
A new instance of Data.
- #obtain_full_post_text_line ⇒ Object
Constructor Details
#initialize(*args) ⇒ Data
Returns a new instance of Data.
24 25 26 |
# File 'lib/kameleoon/data.rb', line 24 def initialize(*args) raise KameleoonError.new("Cannot initialise interface.") end |
Instance Attribute Details
#instance ⇒ Object
Returns the value of attribute instance.
22 23 24 |
# File 'lib/kameleoon/data.rb', line 22 def instance @instance end |
#sent ⇒ Object
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_line ⇒ Object
28 29 30 |
# File 'lib/kameleoon/data.rb', line 28 def obtain_full_post_text_line raise KameleoonError.new("ToDo: implement this method.") end |