# File lib/hammer_cli/output/dsl.rb, line 46 def collection(key, label, options={}, &block) field key, label, Fields::Collection, options, &block end
# File lib/hammer_cli/output/dsl.rb, line 51 def current_path @current_path ||= [] @current_path end
# File lib/hammer_cli/output/dsl.rb, line 29 def custom_field(type, options={}, &block) self.fields << type.new(options, &block) end
# File lib/hammer_cli/output/dsl.rb, line 20 def field(key, label, type=nil, options={}, &block) options[:path] = current_path.clone options[:path] << key if !key.nil? options[:label] = label type ||= Fields::Field custom_field type, options, &block end
Generated with the Darkfish Rdoc Generator 2.