I am trying to run a lib task from the rails console. The lib task looks like follows:
class ImagesImport
def initialize(param1)
option
end
def option
#auth_code
options = { param2, param3 } # with key n value
import(options)
end
def import(options)
#data creating code
end
end
I am trying to run the import(options)
method. As per my knowledge, now all I need to do is go to the rails console and call:
ImagesImport.new('param1')
This is supposed to run the import task. But instead its creating some kind of object like follows:
#<ImagesImport:0x0000000a1bb868 param1 = "value">