Method: TwitterObject#initialize

Defined in:
lib/userstream/twitter_object.rb

#initialize(base, data = nil) {|_self| ... } ⇒ TwitterObject

Returns a new instance of TwitterObject.

Yields:

  • (_self)

Yield Parameters:

  • _self (TwitterObject)

    the object that the method was called on



8
9
10
11
12
# File 'lib/userstream/twitter_object.rb', line 8

def initialize(base, data = nil)
  @base, @data = base, data
  from_json(data) if data
  yield self if block_given?
end