Module: GeoPattern::Roles::ComparableMetadata

Included in:
Background, Structure
Defined in:
lib/geo_pattern/roles/comparable_metadata.rb

Overview

A comparable metadata

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


6
7
8
# File 'lib/geo_pattern/roles/comparable_metadata.rb', line 6

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#generator?(value) ⇒ Boolean


10
11
12
13
14
15
16
17
# File 'lib/geo_pattern/roles/comparable_metadata.rb', line 10

def generator?(value)
  return false unless value.is_a?(Class) || value.nil?
  return true if value.nil? && @generator

  return true if value == generator

  false
end