Sha256: 99221d35092d5d6c06f722d56a6cda927137c006fabbbf05536509045f532558

Contents?: true

Size: 597 Bytes

Versions: 10

Compression:

Stored size: 597 Bytes

Contents

require File.dirname(__FILE__) + '/../lib/highrise'

def turn_methods_public(classe, method_name = nil)
  if method_name
    classe.class_eval do
      public method_name
    end
  else
    turn_all_methods_public classe
  end
end

def turn_all_methods_public(classe)
  classe.class_eval do
    private_instance_methods.each { |instance_method| public instance_method }
    private_methods.each { |method| public_class_method method } 
    protected_instance_methods.each { |instance_method| public instance_method }
    protected_methods.each { |method| public_class_method method } 
  end  
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
kmayer-highrise-0.11.0 spec/spec_helper.rb
kmayer-highrise-0.11.1 spec/spec_helper.rb
kmayer-highrise-0.12.0 spec/spec_helper.rb
kmayer-highrise-0.13.0 spec/spec_helper.rb
kmayer-highrise-0.8.0 spec/spec_helper.rb
kmayer-highrise-0.8.1 spec/spec_helper.rb
kmayer-highrise-0.9.0 spec/spec_helper.rb
kmayer-highrise-0.9.1 spec/spec_helper.rb
kmayer-highrise-0.9.2 spec/spec_helper.rb
soleone-highrise-0.13.3 spec/spec_helper.rb