Class: Gns::GithubItem
- Inherits:
-
Object
- Object
- Gns::GithubItem
- Defined in:
- lib/gns/github_atom.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(atom_item) ⇒ GithubItem
constructor
A new instance of GithubItem.
Constructor Details
#initialize(atom_item) ⇒ GithubItem
Returns a new instance of GithubItem.
35 36 37 38 39 40 41 42 43 |
# File 'lib/gns/github_atom.rb', line 35 def initialize(atom_item) @updated = atom_item.updated.content @title = atom_item.title.content @url = atom_item.link.href atom_item.content.content =~ /<p>(.*)<\/p>/ @body = $1 atom_item.content.content =~ /<a.*>(.*)<\/a>/ @repo = $1 end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
33 34 35 |
# File 'lib/gns/github_atom.rb', line 33 def body @body end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
33 34 35 |
# File 'lib/gns/github_atom.rb', line 33 def repo @repo end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
33 34 35 |
# File 'lib/gns/github_atom.rb', line 33 def title @title end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated.
33 34 35 |
# File 'lib/gns/github_atom.rb', line 33 def updated @updated end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
33 34 35 |
# File 'lib/gns/github_atom.rb', line 33 def url @url end |