class GraphStarter::Configuration
Attributes
default_image_style[RW]
editable_properties[RW]
icon_classes[RW]
scope_filters[RW]
user_class[W]
Public Class Methods
new()
click to toggle source
# File lib/graph_starter/configuration.rb, line 7 def initialize @icon_classes = {} @scope_filters = {} @editable_properties = {} end
Public Instance Methods
user_class()
click to toggle source
# File lib/graph_starter/configuration.rb, line 13 def user_class @user_class || (:User if defined?(::User)) end
validation_errors()
click to toggle source
# File lib/graph_starter/configuration.rb, line 17 def validation_errors {}.tap do |errors| if !(@menu_models.respond_to?(:each) || @menu_models.nil?) errors[:menu_models] = 'should be enumerable or nil' end if !@icon_classes.is_a?(Hash) errors[:icon_classes] = 'should be a Hash' end if !@editable_properties.is_a?(Hash) errors[:editable_properties] = 'should be a Hash' end if !@scope_filters.is_a?(Hash) errors[:scope_filters] = 'should be a Hash' end end end