Class: Decode::Language::Ruby::Module

Inherits:
Definition show all
Defined in:
lib/decode/language/ruby/module.rb

Overview

A Ruby-specific module.

Instance Attribute Summary

Attributes inherited from Definition

#comments

Attributes inherited from Symbol

#kind, #language, #name, #parent

Instance Method Summary collapse

Methods inherited from Definition

#documentation, #initialize, #multiline?, #nested?, #qualified_form, #text

Methods inherited from Symbol

#initialize, #inspect, #key, #lexical_path, #path, #qualified_name

Constructor Details

This class inherits a constructor from Decode::Definition

Instance Method Details

#container?Boolean

A module is a container for other definitions.

Returns:

  • (Boolean)


29
30
31
# File 'lib/decode/language/ruby/module.rb', line 29

def container?
	true
end

#short_formObject Also known as: long_form

The short form of the module. e.g. ‘module Barnyard`.



35
36
37
# File 'lib/decode/language/ruby/module.rb', line 35

def short_form
	"module #{@name}"
end