Sha256: ddbb7ca58e3e321bbdea8848d3ccb6557db067dddfd410368d9f12774407615d
Contents?: true
Size: 712 Bytes
Versions: 42
Compression:
Stored size: 712 Bytes
Contents
require 'sunrise/config/group' module Sunrise module Config module HasGroups # Accessor for a group # # If group with given name does not yet exist it will be created. If a # block is passed it will be evaluated in the context of the group def group(name, options = nil, &block) groups[name] ||= Sunrise::Config::Group.new(abstract_model, self, name, options) groups[name].instance_eval &block if block groups[name] end # Reader for groups def groups @groups ||= {} end # Reader for groups that are marked as visible def visible_groups groups.select {|g| g.visible? } end end end end
Version data entries
42 entries across 42 versions & 1 rubygems