Class: Twitter::Identity

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

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, display_uri_attr_reader, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

#initialize(attrs = {}) ⇒ Twitter::Identity

Initializes a new object

Parameters:

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

Raises:

  • (ArgumentError)

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



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

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

Instance Attribute Details

#idInteger (readonly)

Returns:

  • (Integer)


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

def id
  @id
end