Skip to content

Instantly share code, notes, and snippets.

@zdavatz
Created March 15, 2011 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zdavatz/870809 to your computer and use it in GitHub Desktop.
Save zdavatz/870809 to your computer and use it in GitHub Desktop.
persistable.rb
def odba_target_ids
ids = super
self.each { |value|
if(value.is_a?(ODBA::Persistable))
ids.push(value.odba_id)
end
}
ids.uniq
end
@mhatakeyama
Copy link

module Mod
def test
123
end
end

class Test
include Mod
def test
p super
p "---"
234
end
def hello
p "hello"
end
end

test = Test.new
p test.test

class SubTest < Test
def hello
super
end
end

sub = SubTest.new
sub.hello

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment