Class: SolrMakr::OptionMapping Private
- Inherits:
-
Object
- Object
- SolrMakr::OptionMapping
- Includes:
- Enumerable
- Defined in:
- lib/solr_makr/meta/option_mapping.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #<<(definition) ⇒ Object private
- #add_to_command!(command) ⇒ void private
- #each ⇒ Object private
-
#initialize ⇒ OptionMapping
constructor
private
A new instance of OptionMapping.
Constructor Details
#initialize ⇒ OptionMapping
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of OptionMapping.
6 7 8 |
# File 'lib/solr_makr/meta/option_mapping.rb', line 6 def initialize @_mapping = {}.with_indifferent_access end |
Instance Method Details
#<<(definition) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 15 16 17 18 |
# File 'lib/solr_makr/meta/option_mapping.rb', line 12 def <<(definition) raise TypeError, "not a definition" unless definition.kind_of?(SolrMakr::OptionDefinition) @_mapping[definition.name] = definition return self end |
#add_to_command!(command) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
30 31 32 33 34 35 36 |
# File 'lib/solr_makr/meta/option_mapping.rb', line 30 def add_to_command!(command) each do |definition| definition.add_to_command! command end return nil end |
#each ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 25 26 |
# File 'lib/solr_makr/meta/option_mapping.rb', line 20 def each return enum_for(:each) unless block_given? @_mapping.each_value do |definition| yield definition end end |