Class: MundoPepino::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/mundo_pepino/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Config

Returns a new instance of Config.



10
11
12
13
14
15
# File 'lib/mundo_pepino/config.rb', line 10

def initialize(&block)
  @models_to_clean = []
  @model_mappings, @field_mappings, @page_mappings = {}, {}, {} 
  @relation_model_mappings, @url_mappings = {}, {}
  configure(&block) if block_given?
end

Instance Attribute Details

#field_mappingsObject

Returns the value of attribute field_mappings.



3
4
5
# File 'lib/mundo_pepino/config.rb', line 3

def field_mappings
  @field_mappings
end

#model_mappingsObject

Returns the value of attribute model_mappings.



3
4
5
# File 'lib/mundo_pepino/config.rb', line 3

def model_mappings
  @model_mappings
end

#models_to_cleanObject

Returns the value of attribute models_to_clean.



3
4
5
# File 'lib/mundo_pepino/config.rb', line 3

def models_to_clean
  @models_to_clean
end

#page_mappingsObject

Returns the value of attribute page_mappings.



3
4
5
# File 'lib/mundo_pepino/config.rb', line 3

def page_mappings
  @page_mappings
end

#relation_model_mappingsObject

Returns the value of attribute relation_model_mappings.



3
4
5
# File 'lib/mundo_pepino/config.rb', line 3

def relation_model_mappings
  @relation_model_mappings
end

#url_mappingsObject

Returns the value of attribute url_mappings.



3
4
5
# File 'lib/mundo_pepino/config.rb', line 3

def url_mappings
  @url_mappings
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



17
18
19
# File 'lib/mundo_pepino/config.rb', line 17

def configure(&block)
  yield(self)
end