Class: CodeFormatter::Formatter
- Inherits:
-
Object
- Object
- CodeFormatter::Formatter
- Defined in:
- lib/code_formatter/formatters/formatter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(config) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(config) ⇒ Formatter
Returns a new instance of Formatter.
5 6 7 8 |
# File 'lib/code_formatter/formatters/formatter.rb', line 5 def initialize(config) raise TypeError unless config.is_a? Configuration @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/code_formatter/formatters/formatter.rb', line 3 def config @config end |
Instance Method Details
#format ⇒ Object
10 11 12 |
# File 'lib/code_formatter/formatters/formatter.rb', line 10 def format raise NotImplementedError end |