Module: One9::Rc
- Defined in:
- lib/one9/rc.rb
Class Method Summary collapse
- .change(meths, msg = nil, options = {}) ⇒ Object
- .create(meths, type, msg, options) ⇒ Object
- .delete(meths, msg = nil, options = {}) ⇒ Object
- .load(file) ⇒ Object
- .meths ⇒ Object
Class Method Details
.change(meths, msg = nil, options = {}) ⇒ Object
14 15 16 |
# File 'lib/one9/rc.rb', line 14 def self.change(meths, msg=nil, ={}) create(meths, :change, msg, ) end |
.create(meths, type, msg, options) ⇒ Object
22 23 24 25 26 |
# File 'lib/one9/rc.rb', line 22 def self.create(meths, type, msg, ) Array(meths).each {|e| self.meths << Method.new(e, .merge(:type => type, :message => msg)) } end |
.delete(meths, msg = nil, options = {}) ⇒ Object
18 19 20 |
# File 'lib/one9/rc.rb', line 18 def self.delete(meths, msg=nil, ={}) create(meths, :delete, msg, ) end |
.load(file) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/one9/rc.rb', line 3 def self.load(file) module_eval File.read(file) rescue StandardError, SyntaxError, LoadError => err warn "one9: Error while loading #{file}:\n"+ "#{err.class}: #{err.}\n #{err.backtrace.slice(0,10).join("\n ")}" end |
.meths ⇒ Object
10 11 12 |
# File 'lib/one9/rc.rb', line 10 def self.meths @meths ||= [] end |