Class: ClassMetrix::Formatters::Base::BaseFormatter
- Inherits:
-
Object
- Object
- ClassMetrix::Formatters::Base::BaseFormatter
- Defined in:
- lib/class_metrix/formatters/base/base_formatter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#expand_hashes ⇒ Object
readonly
Returns the value of attribute expand_hashes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(data, expand_hashes = false, options = {}) ⇒ BaseFormatter
constructor
A new instance of BaseFormatter.
Constructor Details
#initialize(data, expand_hashes = false, options = {}) ⇒ BaseFormatter
Returns a new instance of BaseFormatter.
11 12 13 14 15 16 |
# File 'lib/class_metrix/formatters/base/base_formatter.rb', line 11 def initialize(data, = false, = {}) @data = data @expand_hashes = @options = .merge() @value_processor = Shared::ValueProcessor end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/class_metrix/formatters/base/base_formatter.rb', line 9 def data @data end |
#expand_hashes ⇒ Object (readonly)
Returns the value of attribute expand_hashes.
9 10 11 |
# File 'lib/class_metrix/formatters/base/base_formatter.rb', line 9 def @expand_hashes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/class_metrix/formatters/base/base_formatter.rb', line 9 def @options end |
Instance Method Details
#format ⇒ Object
18 19 20 |
# File 'lib/class_metrix/formatters/base/base_formatter.rb', line 18 def format raise NotImplementedError, "Subclasses must implement #format method" end |