Class: Ansa::News

Inherits:
Object
  • Object
show all
Defined in:
lib/ansa/news.rb

Overview

Base class representing a news

Instance Method Summary collapse

Constructor Details

#initialize(title, description, date, link) ⇒ News

Returns a new instance of News.



6
7
8
9
10
11
# File 'lib/ansa/news.rb', line 6

def initialize(title, description, date, link)
  @title = title
  @description = description
  @date = date
  @link = link
end

Instance Method Details

#dateTime

Returns the date of the news.

Returns:

  • (Time)

    the date of the news



24
25
26
# File 'lib/ansa/news.rb', line 24

def date
  @date
end

#descriptionString

Returns the description of the news.

Returns:

  • (String)

    the description of the news



19
20
21
# File 'lib/ansa/news.rb', line 19

def description
  @description
end

Returns the link of the news.

Returns:

  • (String)

    the link of the news



29
30
31
# File 'lib/ansa/news.rb', line 29

def link
  @link
end

#titleString

Returns the title of the news.

Returns:

  • (String)

    the title of the news



14
15
16
# File 'lib/ansa/news.rb', line 14

def title
  @title
end