Class: KizAPI::KeywordInContexts::Context
- Inherits:
-
Array
- Object
- Array
- KizAPI::KeywordInContexts::Context
- Defined in:
- lib/kizapi.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(item) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(item) ⇒ Context
Returns a new instance of Context.
70 71 72 73 74 75 76 77 |
# File 'lib/kizapi.rb', line 70 def initialize(item) @title = item.title @date = item.pubDate @link = URI.parse(item.link) item.description.split("<br>")[0..2].each do |s| push s unless /^<ul>/.match(s) end end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
69 70 71 |
# File 'lib/kizapi.rb', line 69 def date @date end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
69 70 71 |
# File 'lib/kizapi.rb', line 69 def link @link end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
69 70 71 |
# File 'lib/kizapi.rb', line 69 def title @title end |