Class: MarkdownComposer::Registries

Inherits:
Object
  • Object
show all
Includes:
ActionRegistryEntries, DefaultTransformEntries, SourceRegistryEntries, TakeRegistryEntries, TargetRegistryEntries, UnitTokenRegistryEntries, WhereRegistryEntries
Defined in:
lib/markdown_composer/registries.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRegistries

Returns a new instance of Registries.



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/markdown_composer/registries.rb', line 32

def initialize
  @unit_tokens = Registry.new(unit_token_entries)
  @sources = Registry.new(source_entries)
  @actions = Registry.new(action_entries)
  @targets = Registry.new(target_entries)
  @transforms = Registry.new(transform_entries)
  @take = Registry.new(take_entries)
  @condition_fields = Registry.new(condition_field_entries)
  @predicates = Registry.new(predicate_entries)
  @where_groups = Registry.new(where_group_entries)
  @where = WhereRegistry.new(fields: condition_field_entries, predicates: predicate_entries, groups: where_group_entries)
  @conditions = @where.condition_map
end

Instance Attribute Details

#actionsObject (readonly)

Returns the value of attribute actions.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def actions
  @actions
end

#condition_fieldsObject (readonly)

Returns the value of attribute condition_fields.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def condition_fields
  @condition_fields
end

#conditionsObject (readonly)

Returns the value of attribute conditions.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def conditions
  @conditions
end

#predicatesObject (readonly)

Returns the value of attribute predicates.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def predicates
  @predicates
end

#sourcesObject (readonly)

Returns the value of attribute sources.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def sources
  @sources
end

#takeObject (readonly)

Returns the value of attribute take.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def take
  @take
end

#targetsObject (readonly)

Returns the value of attribute targets.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def targets
  @targets
end

#transformsObject (readonly)

Returns the value of attribute transforms.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def transforms
  @transforms
end

#unit_tokensObject (readonly)

Returns the value of attribute unit_tokens.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def unit_tokens
  @unit_tokens
end

#whereObject (readonly)

Returns the value of attribute where.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def where
  @where
end

#where_groupsObject (readonly)

Returns the value of attribute where_groups.



25
26
27
# File 'lib/markdown_composer/registries.rb', line 25

def where_groups
  @where_groups
end

Class Method Details

.defaultObject



28
29
30
# File 'lib/markdown_composer/registries.rb', line 28

def self.default
  @default ||= new
end