Class: Fiona7::AttributeNameMangler
- Inherits:
-
Object
- Object
- Fiona7::AttributeNameMangler
- Defined in:
- lib/fiona7/attribute_name_mangler.rb
Instance Method Summary collapse
-
#initialize(attribute, obj_class) ⇒ AttributeNameMangler
constructor
A new instance of AttributeNameMangler.
- #mangle ⇒ Object
Constructor Details
#initialize(attribute, obj_class) ⇒ AttributeNameMangler
Returns a new instance of AttributeNameMangler.
5 6 7 8 |
# File 'lib/fiona7/attribute_name_mangler.rb', line 5 def initialize(attribute, obj_class) @attribute = attribute @obj_class = obj_class end |
Instance Method Details
#mangle ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/fiona7/attribute_name_mangler.rb', line 10 def mangle if Fiona7.mode == :standalone mangled_obj_class = Fiona7::ObjClassNameMangler.new(@obj_class).mangle "s_#{mangled_obj_class}__#{@attribute}" else @attribute end end |