Class: Twitter::Identity

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter/identity.rb

Direct Known Subclasses

BasicUser, DirectMessage, List, Media::Photo, Place, SavedSearch, Streaming::DeletedTweet, Tweet

Instance Attribute Summary (collapse)

Attributes inherited from Base

#attrs

Instance Method Summary (collapse)

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, deprecate_attribute_method, display_uri_attr_reader, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

- (Twitter::Identity) initialize(attrs = {})

Initializes a new object

Parameters:

  • attrs (Hash) (defaults to: {})

Raises:

  • (ArgumentError)

    Error raised when supplied argument is missing an :id key.



14
15
16
17
# File 'lib/twitter/identity.rb', line 14

def initialize(attrs = {})
  attrs.fetch(:id)
  super
end

Instance Attribute Details

- (Object) id (readonly)

Returns the value of attribute id



7
8
9
# File 'lib/twitter/identity.rb', line 7

def id
  @id
end