Class: Rundown::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/rundown/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Parser

Returns a new instance of Parser.



5
6
7
# File 'lib/rundown/parser.rb', line 5

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/rundown/parser.rb', line 3

def text
  @text
end

Instance Method Details

#datesObject



9
10
11
# File 'lib/rundown/parser.rb', line 9

def dates
  @dates ||= Processors::Dates.new(text).process
end

#emailsObject



13
14
15
# File 'lib/rundown/parser.rb', line 13

def emails
  @email ||= Processors::Email.new(text).process
end

#hashtagsObject



29
30
31
# File 'lib/rundown/parser.rb', line 29

def hashtags
  @hashtags ||= Processors::Hashtags.new(text).process
end

#phonesObject



17
18
19
# File 'lib/rundown/parser.rb', line 17

def phones
  @phone ||= Processors::Phone.new(text).process
end

#sentimentObject



21
22
23
# File 'lib/rundown/parser.rb', line 21

def sentiment
  @sentiment ||= Processors::Sentiment.new(text).process
end

#usernamesObject



25
26
27
# File 'lib/rundown/parser.rb', line 25

def usernames
  @usernames ||= Processors::Twitter.new(text).process
end