Sha256: 43a13b1b4a648cc0d178941ecf2f42b8c8396776e5027d5a46712f0bd8f75694
Contents?: true
Size: 692 Bytes
Versions: 12
Compression:
Stored size: 692 Bytes
Contents
format :html do view :views_by_format do format_views = self.class.ancestors.each_with_object({}) do |format_class, hash| views = format_class.instance_methods.map do |method| next unless method.to_s =~ /^_view_(.+)$/ Regexp.last_match(1) end.compact next unless views.present? format_class.name =~ /^Card(::Set)?::(.+?)$/ #::(\w+Format) hash[Regexp.last_match(2)] = views end accordion_group format_views end view :views_by_name do views = methods.map do |method| Regexp.last_match(1) if method.to_s.match?(/^_view_(.+)$/) end.compact.sort list_group views end end
Version data entries
12 entries across 12 versions & 1 rubygems