Class: MLS::Property::String

Inherits:
MLS::Property show all
Defined in:
lib/mls/properties/string.rb

Constant Summary

Constants inherited from MLS::Property

DEFAULT_OPTIONS

Instance Attribute Summary

Attributes inherited from MLS::Property

#default, #instance_variable_name, #model, #name, #options, #reader_visibility, #writer_visibility

Instance Method Summary collapse

Methods inherited from MLS::Property

demodulized_names, determine_class, #determine_visibility, find_class, inherited, #initialize, #set_default_value

Constructor Details

This class inherits a constructor from MLS::Property

Instance Method Details

#load(value) ⇒ Object Also known as: dump

from_json



3
4
5
6
7
8
9
10
11
# File 'lib/mls/properties/string.rb', line 3

def load(value) # from_json
	if value.nil?
		nil
	elsif value.is_a?(::String)
		value
	else
		value.to_s
	end
end