`
reverocean
  • 浏览: 196591 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

Three method define class methods

    博客分类:
  • Ruby
阅读更多
The following all define class methods within class Demo.
ruby 代码
 
  1. class Demo  
  2.     def Demo.meth1  
  3.     # ...  
  4.     end  
  5.     def self.meth2  
  6.     # ...  
  7.     end  
  8.     class <<self  
  9.         def meth3  
  10.         # ...  
  11.         end  
  12.     end  
  13. end  
分享到:
评论

相关推荐

    RemObjects SDK for Delphi

    Advanced This example shows how to use a Class Factory to generate three types of server: Singleton: all clients access a single server object. Single Call: server instances are created on demand ...

    Java邮件开发Fundamentals of the JavaMail API

    Fundamentals of the JavaMail API Presented by developerWorks, your source for great tutorials ... Table of Contents If you're viewing this document online, you can click any of the topics below ...

    雷达技术知识

    surface slopes in three reaches of the Sandy River, Oregon, USA. LiDAR data were compared with field measurements to evaluate accuracies and determine how water surface roughness and point density ...

    UG6.0快捷键大全

    MESSAGE Modifies the faces of a body by the use of various methods. HINT This command is superseded by Synchronous Modeling commands. To run this legacy command, set UGII_DMX_NX502=1. HELP DSN_face...

    spring-framework-reference4.1.4

    3.2. Removed Deprecated Packages and Methods .................................................... 17 3.3. Java 8 (as well as 6 and 7) .....................................................................

    spring-framework-reference-4.1.2

    3.2. Removed Deprecated Packages and Methods .................................................... 17 3.3. Java 8 (as well as 6 and 7) .....................................................................

Global site tag (gtag.js) - Google Analytics