Class: GoogleReader::Source
- Inherits:
-
Object
- Object
- GoogleReader::Source
- Defined in:
- lib/google_reader/source.rb
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(values) ⇒ Source
constructor
A new instance of Source.
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
#href ⇒ Object (readonly)
Returns the value of attribute href.
3 4 5 |
# File 'lib/google_reader/source.rb', line 3 def href @href end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/google_reader/source.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/google_reader/source.rb', line 3 def name @name end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/google_reader/source.rb', line 3 def title @title end |