Module: Hanswurst::Shares

Defined in:
lib/hanswurst/shares.rb

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/hanswurst/shares.rb', line 3

def self.included(mod)
  mod.instance_eval do
    def shares(hsh)
      hsh = {hsh => hsh} if hsh.is_a? Symbol
      @shared_dependancies ||= {}
      @shared_dependancies.update hsh
    end

    def shared_dependancies
      @shared_dependancies || {}
    end
  end
end