module Zobi
Constants
- BEHAVIORS
- Discover
- VERSION
Public Class Methods
extended(base)
click to toggle source
# File lib/zobi.rb, line 8 def self.extended base base.helper_method :collection, :resource, :resource_class, :collection_path, :new_resource_path, :edit_resource_path, :resource_path end
Public Instance Methods
behavior_included?(name)
click to toggle source
# File lib/zobi.rb, line 24 def behavior_included? name ancestors.include?(behavior_module(name)) end
behavior_module(name)
click to toggle source
# File lib/zobi.rb, line 20 def behavior_module name "Zobi::#{name.to_s.camelize}".constantize end
behaviors(*behaviors)
click to toggle source
# File lib/zobi.rb, line 13 def behaviors *behaviors (BEHAVIORS & behaviors).each do |behavior| send(:include, behavior_module(behavior)) end send(:include, ::Zobi::InstanceMethods) end