Module: ClientData::Methods

Extended by:
ActiveSupport::Concern
Defined in:
lib/client_data/methods.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#buildersObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/client_data/methods.rb', line 29

def builders
  @builders ||= begin
    builders_hash = {}
    builder_options_hash.each do |key, options|
      name = options[:as].nil? ? key : options[:as]
      builders_hash[name] = create_builder(key)
    end
    builders_hash
  end
end

#client_data_options(builder_name, options) ⇒ Object



24
25
26
27
# File 'lib/client_data/methods.rb', line 24

def client_data_options(builder_name, options)
  builder_options_hash[builder_name.to_sym] ||= {}
  builder_options_hash[builder_name.to_sym].merge!(options)
end