Module: Magnetic::Interface::DSL

Included in:
ActionController::Base, ApplicationController
Defined in:
lib/magnetic/interface.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(other) ⇒ Object



92
93
94
95
96
# File 'lib/magnetic/interface.rb', line 92

def self.included other
  super
ensure
  other.extend self
end

Instance Method Details

#interface(*a, &b) ⇒ Object



85
86
87
88
89
90
91
# File 'lib/magnetic/interface.rb', line 85

def interface *a, &b
  if a.empty? and b.nil?
    @interface
  else
    @interface = Interface.new :records => a.shift, :controller => self, &b
  end
end