Class: ClassMetrix::Formatters::Base::BaseComponent
- Inherits:
-
Object
- Object
- ClassMetrix::Formatters::Base::BaseComponent
- Defined in:
- lib/class_metrix/formatters/base/base_component.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#value_processor ⇒ Object
readonly
Returns the value of attribute value_processor.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(data, options = {}) ⇒ BaseComponent
constructor
A new instance of BaseComponent.
Constructor Details
#initialize(data, options = {}) ⇒ BaseComponent
Returns a new instance of BaseComponent.
11 12 13 14 15 |
# File 'lib/class_metrix/formatters/base/base_component.rb', line 11 def initialize(data, = {}) @data = data @options = @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_component.rb', line 9 def data @data end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/class_metrix/formatters/base/base_component.rb', line 9 def @options end |
#value_processor ⇒ Object (readonly)
Returns the value of attribute value_processor.
9 10 11 |
# File 'lib/class_metrix/formatters/base/base_component.rb', line 9 def value_processor @value_processor end |
Instance Method Details
#generate ⇒ Object
17 18 19 |
# File 'lib/class_metrix/formatters/base/base_component.rb', line 17 def generate raise NotImplementedError, "Subclasses must implement #generate method" end |