Class: GoogleReader::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/google_reader/source.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values) ⇒ Source

Returns a new instance of Source.



5
6
7
8
9
# File 'lib/google_reader/source.rb', line 5

def initialize(values)
  %w(title href id stream_id).each do |attr|
    instance_variable_set("@#{attr}", values.fetch(attr.to_sym))
  end
end

Instance Attribute Details

#hrefObject (readonly)

Returns the value of attribute href.



3
4
5
# File 'lib/google_reader/source.rb', line 3

def href
  @href
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/google_reader/source.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/google_reader/source.rb', line 3

def name
  @name
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/google_reader/source.rb', line 3

def title
  @title
end