I m working in rails.i want to call a function(show) of class "twitter" in searcht1 which is in "lib" within a same directory from rake task.
lib/task/search.rake:
require_relative "lib/Searcht1"
namespace :Searcht do
task :search => :environment do
obj=Twitter.new
obj.show
end
end
and the class inside the "searcht1.rb" is like this
class Twitter
def show
"anylogic"
end
end
but it is not calling that function.and i m not getting any result. greatly aprreciate any help