Module: VV::FileMethods
- Included in:
- File
- Defined in:
- lib/vv/file_methods.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.check_file_methods ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/vv/file_methods.rb', line 4 def self.check_file_methods ClassMethods.public_instance_methods.each do |method| next if method.to_s.starts_with? "vv_" = \ "File defines method already, cowardly exiting." fail if File.respond_to? method end end |
.included(base) ⇒ Object
14 15 16 17 18 |
# File 'lib/vv/file_methods.rb', line 14 def self.included(base) self.check_file_methods if base == File base.extend(ClassMethods) end |
Instance Method Details
#vv_readlines ⇒ Object
247 248 249 |
# File 'lib/vv/file_methods.rb', line 247 def vv_readlines self.class.vv_readlines self end |