Module: LazyModelSupport

Extended by:
ActiveSupport::Concern
Included in:
LazyModel::LazyBoolean, LazyModel::LazyState
Defined in:
lib/lazy_model/lazy_model_support.rb

Instance Method Summary collapse

Instance Method Details

#initialize(model, raw_attribute, enumerables = nil, custom_finders = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/lazy_model/lazy_model_support.rb', line 8

def initialize(model, raw_attribute, enumerables = nil, custom_finders = {})
	self.model 			= model
	self.raw_attribute 	= raw_attribute
	self.enumerables 	= enumerables
	self.custom_finders = custom_finders
	calculate_atttribute_and_belongs_to
end

#to_method_name(any_string_or_symbol) ⇒ Object



16
17
18
# File 'lib/lazy_model/lazy_model_support.rb', line 16

def to_method_name(any_string_or_symbol)
	any_string_or_symbol.to_s.underscore
end