Module: ObjectExtension
- Included in:
- Object
- Defined in:
- lib/oha_extensions/object_extension.rb
Instance Method Summary collapse
Instance Method Details
#has_additional_functionality_in(*files) ⇒ Object
2 3 4 5 6 |
# File 'lib/oha_extensions/object_extension.rb', line 2 def has_additional_functionality_in(*files) files.each do |file| require_dependency "#{name.underscore}_extensions/#{file}" end end |
#send_if_respond_to(method, *args) ⇒ Object
8 9 10 |
# File 'lib/oha_extensions/object_extension.rb', line 8 def send_if_respond_to(method, *args) self.respond_to?(method) ? self.send(method, *args) : nil end |