Method: AccessorUtilities::StringInstance#write_accessor_name
- Defined in:
- lib/accessor-utilities/AccessorUtilities/StringInstance.rb
#write_accessor_name ⇒ Object
write_accessor_name #
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/accessor-utilities/AccessorUtilities/StringInstance.rb', line 167 def write_accessor_name write_accessor_name_string = nil last_index = length - 1 if self[ last_index ] == '=' and self[ 0 ] != '@' write_accessor_name_string = self else write_accessor_name_string = accessor_name.to_s last_index = write_accessor_name_string.length - 1 if write_accessor_name_string[ last_index ] == '?' write_accessor_name_string.slice!( last_index, last_index + 1 ) end write_accessor_name_string.concat( '=' ) end return write_accessor_name_string.to_sym end |