Module: Nisetegami::Utils
- Defined in:
- lib/nisetegami/utils.rb
Class Method Summary collapse
Class Method Details
.filenames(path, format) ⇒ Object
10 11 12 |
# File 'lib/nisetegami/utils.rb', line 10 def filenames(path, format) Dir[File.join(path, "*.#{format}.*")].map { |file| File.basename(file).sub(/\.#{format}#{File.extname(file)}$/, "") }.uniq end |
.liquid_methods_for(thing) ⇒ Object
5 6 7 8 |
# File 'lib/nisetegami/utils.rb', line 5 def liquid_methods_for(thing) return nil unless thing.const_defined?('LiquidDropClass') thing::LiquidDropClass.public_instance_methods(false) end |