Module: Interfacets::Client::Assets::AutoloadHook

Defined in:
lib/interfacets/client/assets.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *a, **p) ⇒ Object

don't think this is needed def const_missing(const_name) if Assets.loader.loaded?(self) super else Assets.loader.load(self) const_get(const_name) end end



198
199
200
201
202
203
204
205
# File 'lib/interfacets/client/assets.rb', line 198

def method_missing(meth, *a, **p, &)
  if Assets.loader.loaded?(self)
    super
  else
    Assets.loader.load(self)
    send(meth, *a, **p, &)
  end
end

Instance Method Details

#append_features(mod) ⇒ Object



148
149
150
151
152
153
154
155
# File 'lib/interfacets/client/assets.rb', line 148

def append_features(mod)
  if Assets.loader.loaded?(self)
    super
  else
    Assets.loader.load(self)
    send(:append_features, mod)
  end
end

#extend_object(o) ⇒ Object



130
131
132
133
134
135
136
137
# File 'lib/interfacets/client/assets.rb', line 130

def extend_object(o)
  if Assets.loader.loaded?(self)
    super
  else
    Assets.loader.load(self)
    send(:extend_object, o)
  end
end

#inherited(mod) ⇒ Object



139
140
141
142
143
144
145
146
# File 'lib/interfacets/client/assets.rb', line 139

def inherited(mod)
  if Assets.loader.loaded?(self)
    super
  else
    Assets.loader.load(self)
    send(:inherited, mod)
  end
end