class Textp::Parser

Public Class Methods

new(text) click to toggle source

Pass in some text and all things that can be parsed will be parsed and seperated into individual parts.

Usage:

> Parser.new(“Meeting tomorrow at 3:30 PM.”)

> Parser.new(“This embeded video is cool: youtube_link”)

# File lib/textp/parser.rb, line 14
def initialize(text)
  @text = text
end

Public Instance Methods

parse() click to toggle source
# File lib/textp/parser.rb, line 18
def parse
  (!@text.nil?) ? @text : nil
end