Modules and class's help

Hi,

Any suggetions on whats going wrong here.

in /lib I hae a file flickr_code.rb
module FlickrCode

class FlickrCode

    def test
        @tests = 'hello'
        return @tests
    end
end

end

In one of my controllers I have

def flickr
    require 'flickr_code'
    oFlickr = FlickrCode::FlickrCode.new
    @returnvalue = oFlickr.test
end

As far as I can work out, this should set @returnvalue in my controller
with ‘hello’. However it doesnt seem to be even running this function,
any ideas?

Hi –

On Sat, 21 Oct 2006, scot wrote:

   def test
   oFlickr = FlickrCode::FlickrCode.new
   @returnvalue = oFlickr.test

end

As far as I can work out, this should set @returnvalue in my controller
with ‘hello’. However it doesnt seem to be even running this function,
any ideas?

Define “seem” and “this function” :slight_smile:

David


David A. Black | [email protected]
Author of “Ruby for Rails” [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB’s Weblog) [2] | Co-director, Ruby Central, Inc. [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com | [4] http://www.rubycentral.org

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs