Class: Mybatis::Generate::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/mybatis/util/context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#column_nameObject

Returns the value of attribute column_name.



7
8
9
# File 'lib/mybatis/util/context.rb', line 7

def column_name
  @column_name
end

#field_nameObject

Returns the value of attribute field_name.



6
7
8
# File 'lib/mybatis/util/context.rb', line 6

def field_name
  @field_name
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/mybatis/util/context.rb', line 8

def type
  @type
end

Class Method Details

.instance_with_options(str) ⇒ Object



11
12
13
14
15
16
# File 'lib/mybatis/util/context.rb', line 11

def instance_with_options str
  attribute = self.new
  attribute.field_name = str.replace_underline_upcase_to.downcase_first
  attribute.column_name = str
  attribute
end