Class: Ar2gostruct::Converter
- Inherits:
-
Object
- Object
- Ar2gostruct::Converter
- Defined in:
- lib/ar2gostruct/converter.rb
Instance Attribute Summary collapse
-
#association ⇒ Object
Returns the value of attribute association.
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#max_col_size ⇒ Object
Returns the value of attribute max_col_size.
-
#max_type_size ⇒ Object
Returns the value of attribute max_type_size.
-
#orm ⇒ Object
Returns the value of attribute orm.
-
#plural ⇒ Object
Returns the value of attribute plural.
Instance Method Summary collapse
- #convert! ⇒ Object
-
#initialize(klass, option = {}) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize(klass, option = {}) ⇒ Converter
Returns a new instance of Converter.
3 4 5 6 7 8 9 10 |
# File 'lib/ar2gostruct/converter.rb', line 3 def initialize(klass, option = {}) @klass = klass @max_col_size = 0 @max_type_size = 0 @plural = option[:plural] @orm = option[:orm] @association = option[:association] end |
Instance Attribute Details
#association ⇒ Object
Returns the value of attribute association.
11 12 13 |
# File 'lib/ar2gostruct/converter.rb', line 11 def association @association end |
#klass ⇒ Object
Returns the value of attribute klass.
11 12 13 |
# File 'lib/ar2gostruct/converter.rb', line 11 def klass @klass end |
#max_col_size ⇒ Object
Returns the value of attribute max_col_size.
11 12 13 |
# File 'lib/ar2gostruct/converter.rb', line 11 def max_col_size @max_col_size end |
#max_type_size ⇒ Object
Returns the value of attribute max_type_size.
11 12 13 |
# File 'lib/ar2gostruct/converter.rb', line 11 def max_type_size @max_type_size end |
#orm ⇒ Object
Returns the value of attribute orm.
11 12 13 |
# File 'lib/ar2gostruct/converter.rb', line 11 def orm @orm end |
#plural ⇒ Object
Returns the value of attribute plural.
11 12 13 |
# File 'lib/ar2gostruct/converter.rb', line 11 def plural @plural end |
Instance Method Details
#convert! ⇒ Object
13 14 15 |
# File 'lib/ar2gostruct/converter.rb', line 13 def convert! get_schema_info end |