Class: KizAPI::KeywordInContexts::Context

Inherits:
Array
  • Object
show all
Defined in:
lib/kizapi.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dateObject (readonly)

Returns the value of attribute date.



69
70
71
# File 'lib/kizapi.rb', line 69

def date
  @date
end

Returns the value of attribute link.



69
70
71
# File 'lib/kizapi.rb', line 69

def link
  @link
end

#titleObject (readonly)

Returns the value of attribute title.



69
70
71
# File 'lib/kizapi.rb', line 69

def title
  @title
end