Class: URL::JSONHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/url/handlers.rb

Direct Known Subclasses

ASJSONHandler, BaseJSONHandler, YajlHandler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ JSONHandler

Returns a new instance of JSONHandler.



41
42
43
# File 'lib/url/handlers.rb', line 41

def initialize(str)
  @str = str
end

Instance Attribute Details

#strObject (readonly)

Returns the value of attribute str.



40
41
42
# File 'lib/url/handlers.rb', line 40

def str
  @str
end

Instance Method Details

#parseObject

Raises:

  • (Exception)


45
46
47
# File 'lib/url/handlers.rb', line 45

def parse
  raise Exception, "You need to implement #{self.class}#parse"
end