Project

General

Profile

Feature #7019

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

=begin 
 I like to indent my private methods one level deeper, but this indentation is inconsistent with the syntax: 

 ~~~ruby 
 

  class C 
   
    def f 
     
      # 
   
    end 
   
    private 
     
      def g 
     
      # 
     
      end 
 
  end 
 ~~~ 

 I think it would be nice if the `private` (({private})) keyword could take a block, then i would write: 

 ~~~ruby 
 

  class C 
   
    def f 
     
      # 
   
    end 
   
    private do 
     
      def g 
     
      # 
     
      end 
   
    end 
  
  end 
 ~~~ =end 

Back