lib/magicka/aggregator.rb in magicka-1.0.0 vs lib/magicka/aggregator.rb in magicka-1.1.0

- old
+ new

@@ -6,30 +6,38 @@ # Class representing an element agregator, representing a model class Aggregator autoload :MethodBuilder, 'magicka/aggregator/method_builder' autoload :ClassMethods, 'magicka/aggregator/class_methods' - class << self - include Aggregator::ClassMethods - end + extend Aggregator::ClassMethods attr_reader :model # @method model # @api public # # Model where the form elements will focus # # @return [String] # @method self.with_element(element_class, method_name = nil, template: nil) + # @api public # # Configure an {Aggregator} adding a method to render an element # - # @param element_class [Class<Magicka::ELement>] - # Class of the element to be rendered - # @param method_name [String,Symbol] - # Name of the method that will render the element - # @param template [String] custom template file to be used + # @overload with_element(element_class, method_name = nil, template: nil) + # @param element_class [Class<Magicka::Element>] + # Class of the element to be rendered + # @param method_name [String,Symbol] + # Name of the method that will render the element + # @param template [String] custom template file to be used + # + # @overload with_element(element_class_name, method_name = nil, template: nil) + # @param element_class_name [String] + # String representation of a class of {Magicka::Element} + # of the element to be rendered + # @param method_name [String,Symbol] + # Name of the method that will render the element + # @param template [String] custom template file to be used # # @see Aggregator::ClassMethods#with_element # @see Aggregator::MethodBuilder # # @return [Array<NilClass>]