Class: RbsSettingslogic::Settingslogic::Generator
- Inherits:
-
Object
- Object
- RbsSettingslogic::Settingslogic::Generator
- Defined in:
- lib/rbs_settingslogic/settingslogic.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(klass) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(klass) ⇒ Generator
Returns a new instance of Generator.
15 16 17 |
# File 'lib/rbs_settingslogic/settingslogic.rb', line 15 def initialize(klass) @klass = klass end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
13 14 15 |
# File 'lib/rbs_settingslogic/settingslogic.rb', line 13 def klass @klass end |
Instance Method Details
#generate ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/rbs_settingslogic/settingslogic.rb', line 19 def generate format <<~RBS class #{klass.name} < ::Settingslogic #{generate_classes(klass)} #{generate_methods(klass)} end RBS end |