Class: RbsActiverecord::Generator::ActiveStorage::InstanceMethods
- Inherits:
-
Object
- Object
- RbsActiverecord::Generator::ActiveStorage::InstanceMethods
- Defined in:
- lib/rbs_activerecord/generator/active_storage/instance_methods.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
: RbsActiverecord::Model.
Instance Method Summary collapse
-
#generate ⇒ Object
: String.
-
#initialize(model) ⇒ InstanceMethods
constructor
A new instance of InstanceMethods.
Constructor Details
#initialize(model) ⇒ InstanceMethods
Returns a new instance of InstanceMethods.
10 11 12 |
# File 'lib/rbs_activerecord/generator/active_storage/instance_methods.rb', line 10 def initialize(model) #: void @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
: RbsActiverecord::Model
7 8 9 |
# File 'lib/rbs_activerecord/generator/active_storage/instance_methods.rb', line 7 def model @model end |
Instance Method Details
#generate ⇒ Object
: String
14 15 16 17 18 19 20 |
# File 'lib/rbs_activerecord/generator/active_storage/instance_methods.rb', line 14 def generate #: String <<~RBS.strip module GeneratedActiveStorageInstanceMethods #{.map { |name, reflection| (name, reflection) }.join("\n")} end RBS end |