Class: Knowledge::Setters::Base
- Inherits:
-
Object
- Object
- Knowledge::Setters::Base
- Defined in:
- lib/knowledge/setters/base.rb
Overview
Description
This adapter is the base setter. It does nothing specific but is meant to manage all generic stuff.
Usage
Just inherit from it
@example:
class MySuperSetter < Knowledge::Setters::Base; end
Attributes
Direct Known Subclasses
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Configuration object - can be whetever your setter knows how to work with.
Instance Method Summary collapse
-
#set(name:, value:) ⇒ Object
Sets the variable.
Instance Attribute Details
#configuration ⇒ Object (readonly)
Configuration object - can be whetever your setter knows how to work with
25 26 27 |
# File 'lib/knowledge/setters/base.rb', line 25 def configuration @configuration end |
Instance Method Details
#set(name:, value:) ⇒ Object
Sets the variable.
Parameters
41 42 43 44 |
# File 'lib/knowledge/setters/base.rb', line 41 def set(name:, value:) = "Expect setter to define #set method to be able to set #{name} with value '#{value}'" raise ::Knowledge::SetterSetMethodNotImplemented, end |