array code completion

I'm a total newbie to Ruby so bear with me.

I am running RubyMine 3.2.1 on Windows 7.  Note the following class, particularly the "with_title" method.  In the IDE when I type a period "." after the "@songs" I get a popup with various methods in it as expected.  However, the "find" method is not one of them.  Since @songs is an Array, I would expect to see "find".  It comes from the Enumerable module that's automatically mixed in to Array and Hash classes.  Why does "find" not show up in the popup?

I put this same file in NetBeans 7.0 and it shows all of the Enumerable mixin methods just fine for the @songs array type.

class SongList
  def initialize
    @songs = Array.new()
  end

  def append(song)
    @songs.push(song)
    self
  end

  def delete_first
    @songs.shift()
  end

  def delete_last
    @songs.pop()
  end

  def [](index)
    @songs[index]
  end

  def with_title(title)
    @songs
  end

end

1 comment
Comment actions Permalink

Please do not forget to mention the issue if you have created one: http://youtrack.jetbrains.net/issue/RUBY-8876

Regards,
Oleg

0

Please sign in to leave a comment.