class Find

Public Class Methods

new(url, text) click to toggle source
# File lib/tagfinder/commands/find.rb, line 4
def initialize(url, text)
  @url = url
  @text = text
end

Public Instance Methods

execute() click to toggle source
# File lib/tagfinder/commands/find.rb, line 9
def execute
  puts "Searching for #{@text} on the url #{@url}..."
  parser = Parser.new(@url)
  result = parser.find_text_in_document(@text)
  if !result.nil?
    puts result
  else
    puts "No text found."
  end
end