Class: Tessa::DynamicExtensions::MultipleFormObject

Inherits:
Tessa::DynamicExtensions show all
Defined in:
lib/tessa/model/dynamic_extensions.rb

Instance Attribute Summary

Attributes inherited from Tessa::DynamicExtensions

#field

Instance Method Summary collapse

Methods inherited from Tessa::DynamicExtensions

#initialize, #name

Constructor Details

This class inherits a constructor from Tessa::DynamicExtensions

Instance Method Details

#build(mod) ⇒ Object

[View source]

151
152
153
154
155
156
157
158
159
160
# File 'lib/tessa/model/dynamic_extensions.rb', line 151

def build(mod)
  mod.class_eval <<~CODE, __FILE__, __LINE__ + 1
      attr_accessor :#{name}_ids
      attr_writer :#{name}
      def #{name}
        @#{name} ||= fetch_tessa_remote_assets(#{name}_ids)
      end
    CODE
  mod
end