Class: RbsShrine::Shrine::Generator
- Inherits:
-
Object
- Object
- RbsShrine::Shrine::Generator
- Defined in:
- lib/rbs_shrine/shrine.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#klass_name ⇒ Object
readonly
Returns the value of attribute klass_name.
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.
18 19 20 21 |
# File 'lib/rbs_shrine/shrine.rb', line 18 def initialize(klass) @klass = klass @klass_name = klass.name || "" end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
16 17 18 |
# File 'lib/rbs_shrine/shrine.rb', line 16 def klass @klass end |
#klass_name ⇒ Object (readonly)
Returns the value of attribute klass_name.
16 17 18 |
# File 'lib/rbs_shrine/shrine.rb', line 16 def klass_name @klass_name end |
Instance Method Details
#generate ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/rbs_shrine/shrine.rb', line 23 def generate format <<~RBS #{header} #{methods} #{} RBS end |