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.
333 334 335 |
# File 'lib/generators/avo/resource_generator.rb', line 333 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
332 333 334 |
# File 'lib/generators/avo/resource_generator.rb', line 332 def name @name end |
Instance Method Details
#inspect ⇒ Object
337 338 339 |
# File 'lib/generators/avo/resource_generator.rb', line 337 def inspect name end |