Class: Polygon::Database::Entries
- Inherits:
-
Object
- Object
- Polygon::Database::Entries
- Defined in:
- lib/polygon/database.rb
Instance Method Summary collapse
- #compiler ⇒ Object
- #each ⇒ Object
-
#initialize(root, options) ⇒ Entries
constructor
A new instance of Entries.
- #to_relation ⇒ Object
Constructor Details
Instance Method Details
#compiler ⇒ Object
64 65 66 |
# File 'lib/polygon/database.rb', line 64 def compiler nil end |
#each ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'lib/polygon/database.rb', line 54 def each return to_enum unless block_given? extensions = @options[:extensions] @root.glob("**/*").each do |file| next unless file.file? and extensions.include?(file.ext) entry = Entry.new(@root, file % @root) yield(:entry => entry) end end |
#to_relation ⇒ Object
68 69 70 |
# File 'lib/polygon/database.rb', line 68 def to_relation Relation(each.to_a) end |