Class: Generators::Avo::Inspector
- Inherits:
-
Object
- Object
- Generators::Avo::Inspector
- Defined in:
- lib/generators/avo/resource_generator.rb
Overview
This class modifies the inspect function to correctly handle polymorphic associations. It is used in the polymorphic_association_types function. Without modification: Model(id: integer, name: string) After modification: Model
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Inspector
constructor
A new instance of Inspector.
- #inspect ⇒ Object
Constructor Details
#initialize(name) ⇒ Inspector
Returns a new instance of Inspector.
326 327 328 |
# File 'lib/generators/avo/resource_generator.rb', line 326 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
325 326 327 |
# File 'lib/generators/avo/resource_generator.rb', line 325 def name @name end |
Instance Method Details
#inspect ⇒ Object
330 331 332 |
# File 'lib/generators/avo/resource_generator.rb', line 330 def inspect name end |