Parent

Class/Module Index [+]

Quicksearch

Twitter::Relationship

Public Class Methods

new(attrs={}) click to toggle source

Initializes a new object

@param attrs [Hash] @return [Twitter::Relationship]

# File lib/twitter/relationship.rb, line 12
def initialize(attrs={})
  @attrs = attrs[:relationship]
end

Public Instance Methods

source() click to toggle source

@return [Twitter::SourceUser]

# File lib/twitter/relationship.rb, line 17
def source
  @source ||= Twitter::SourceUser.fetch_or_new(@attrs[:source])
end
target() click to toggle source

@return [Twitter::TargetUser]

# File lib/twitter/relationship.rb, line 22
def target
  @target ||= Twitter::TargetUser.fetch_or_new(@attrs[:target])
end
update(attrs) click to toggle source

Update the attributes of a Relationship

@param attrs [Hash] @return [Twitter::Relationship]

# File lib/twitter/relationship.rb, line 30
def update(attrs)
  @attrs.update(attrs[:relationship]) unless attrs[:relationship].nil?
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.