Class: BreakingNews::Article

Inherits:
Object
  • Object
show all
Defined in:
lib/breaking_news/article.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Article

Returns a new instance of Article.



4
5
6
7
8
9
10
11
12
# File 'lib/breaking_news/article.rb', line 4

def initialize(hash)
  @headline = hash[:headline]
  @date = hash[:date]
  @p1 = hash[:p1]
  @p2 = hash[:p2]
  @p3 = hash[:p3]
  @p4 = hash[:p4]
  @p5 = hash[:p5]
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



2
3
4
# File 'lib/breaking_news/article.rb', line 2

def date
  @date
end

#headlineObject

Returns the value of attribute headline.



2
3
4
# File 'lib/breaking_news/article.rb', line 2

def headline
  @headline
end

#p1Object

Returns the value of attribute p1.



2
3
4
# File 'lib/breaking_news/article.rb', line 2

def p1
  @p1
end

#p2Object

Returns the value of attribute p2.



2
3
4
# File 'lib/breaking_news/article.rb', line 2

def p2
  @p2
end

#p3Object

Returns the value of attribute p3.



2
3
4
# File 'lib/breaking_news/article.rb', line 2

def p3
  @p3
end

#p4Object

Returns the value of attribute p4.



2
3
4
# File 'lib/breaking_news/article.rb', line 2

def p4
  @p4
end

#p5Object

Returns the value of attribute p5.



2
3
4
# File 'lib/breaking_news/article.rb', line 2

def p5
  @p5
end