Module: CabezaDeTermo::ValidationMessages::Behaviour

Defined in:
lib/validation-messages/behaviour.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/validation-messages/behaviour.rb', line 3

def self.included(base)
	base.class_eval do
		extend ClassMethods

		use_validation_messages_library CabezaDeTermo::ValidationMessages::Library.default
	end
end

Instance Method Details

#validation_message_for(error) ⇒ Object



38
39
40
# File 'lib/validation-messages/behaviour.rb', line 38

def validation_message_for(error)
	validation_messages_dictionary.message_for error
end

#validation_messages_dictionary(&block) ⇒ Object



34
35
36
# File 'lib/validation-messages/behaviour.rb', line 34

def validation_messages_dictionary(&block)
	self.class.validation_messages_dictionary(&block)
end