Module: Decode::Language::Ruby
- Defined in:
- lib/decode/language/ruby.rb,
lib/decode/language/ruby/call.rb,
lib/decode/language/ruby/block.rb,
lib/decode/language/ruby/class.rb,
lib/decode/language/ruby/method.rb,
lib/decode/language/ruby/module.rb,
lib/decode/language/ruby/parser.rb,
lib/decode/language/ruby/segment.rb,
lib/decode/language/ruby/constant.rb,
lib/decode/language/ruby/function.rb,
lib/decode/language/ruby/attribute.rb,
lib/decode/language/ruby/reference.rb,
lib/decode/language/ruby/definition.rb
Overview
The Ruby language.
Defined Under Namespace
Classes: Attribute, Block, Call, Class, Constant, Definition, Function, Method, Module, Parser, Reference, Segment, Singleton
Class Method Summary collapse
-
.definitions_for(input, &block) ⇒ Object
Parse the input yielding definitions.
- .extensions ⇒ Object
-
.name ⇒ Object
The canoical name of the language for use in output formatting.
- .names ⇒ Object
-
.reference_for(identifier) ⇒ Object
Generate a language-specific reference.
-
.segments_for(input, &block) ⇒ Object
Parse the input yielding interleaved comments and code segments.
Class Method Details
.definitions_for(input, &block) ⇒ Object
Parse the input yielding definitions.
50 51 52 |
# File 'lib/decode/language/ruby.rb', line 50 def self.definitions_for(input, &block) Parser.new.definitions_for(input, &block) end |
.extensions ⇒ Object
38 39 40 |
# File 'lib/decode/language/ruby.rb', line 38 def self.extensions ['.rb', '.ru'] end |
.name ⇒ Object
The canoical name of the language for use in output formatting. e.g. source code highlighting.
30 31 32 |
# File 'lib/decode/language/ruby.rb', line 30 def self.name "ruby" end |
.names ⇒ Object
34 35 36 |
# File 'lib/decode/language/ruby.rb', line 34 def self.names [self.name] end |
.reference_for(identifier) ⇒ Object
Generate a language-specific reference.
43 44 45 |
# File 'lib/decode/language/ruby.rb', line 43 def self.reference_for(identifier) Reference.new(identifier, self) end |
.segments_for(input, &block) ⇒ Object
Parse the input yielding interleaved comments and code segments.
57 58 59 |
# File 'lib/decode/language/ruby.rb', line 57 def self.segments_for(input, &block) Parser.new.segments_for(input, &block) end |