module Omnitest::Psychic::Code2Doc::CommentStyles
This class was extracted from the [Rocco](rtomayko.github.com/rocco/) project which was in turn based on the [Docco](jashkenas.github.com/docco/).
Constants
- COMMENT_STYLES
- C_STYLE_COMMENTS
TODO: This should be YAML, more easily shared with other projects like groc, docco and linguist.
Public Class Methods
infer(extension)
click to toggle source
# File lib/omnitest/psychic/code2doc/comment_styles.rb, line 15 def self.infer(extension) extension.tr! '.', '' return extension, COMMENT_STYLES[extension] if COMMENT_STYLES.key? extension COMMENT_STYLES.each do | _style_name, style | return extension, style if style[:extensions].include? extension end fail UnknownStyleError, extension end