Module: Jekyll::MissingProperty
- Defined in:
- jekyll/_plugins/missing.rb
Instance Method Summary collapse
- #has_any_properties(object, properties) ⇒ Object
- #missing(input, property) ⇒ Object
- #not_missing(input, property) ⇒ Object
- #not_missing_any(input, properties) ⇒ Object
Instance Method Details
#has_any_properties(object, properties) ⇒ Object
21 22 23 |
# File 'jekyll/_plugins/missing.rb', line 21 def has_any_properties(object, properties) properties.any? { |property| item_property(object, property) != nil } end |
#missing(input, property) ⇒ Object
10 11 12 13 14 |
# File 'jekyll/_plugins/missing.rb', line 10 def missing(input, property) return input unless input.is_a?(Enumerable) input = input.values if input.is_a?(Hash) input.select { |object| item_property(object, property) == nil } end |
#not_missing(input, property) ⇒ Object
15 16 17 18 19 |
# File 'jekyll/_plugins/missing.rb', line 15 def not_missing(input, property) return input unless input.is_a?(Enumerable) input = input.values if input.is_a?(Hash) input.select { |object| item_property(object, property) != nil } end |
#not_missing_any(input, properties) ⇒ Object
24 25 26 27 28 |
# File 'jekyll/_plugins/missing.rb', line 24 def not_missing_any(input, properties) return input unless input.is_a?(Enumerable) input = input.values if input.is_a?(Hash) input.select { |object| has_any_properties(object, properties) } end |