module Extentions

THINK: Create, Find, Display extention parts

Constants

VERSION

Public Class Methods

extentions_for(model, context = nil) click to toggle source
# File lib/extentions.rb, line 4
def self.extentions_for(model, context = nil)
  Collection.new model, apply_extentions(model, context)
    # extentions.select do |extention|
    #   extention.applicable_to? params
    # end.map do |extention|
    #   extention.new(params)
    # end
end
register(extention_class) click to toggle source
# File lib/extentions.rb, line 13
def self.register(extention_class)
  @@extentions = extentions << extention_class
end
reset() click to toggle source
# File lib/extentions.rb, line 17
def self.reset
  @@extentions = []
end

Private Class Methods

apply_extentions(*params) click to toggle source
# File lib/extentions.rb, line 22
def self.apply_extentions(*params)
  extentions.map do |extention|
    extention.apply(*params)
  end
end
extentions() click to toggle source
# File lib/extentions.rb, line 28
def self.extentions
  @@extentions ||= []
  @@extentions.uniq.compact
end