Class: Highlander::Dsl::MappingParam

Inherits:
Parameter show all
Defined in:
lib/highlander.dsl.params.rb

Instance Attribute Summary collapse

Attributes inherited from Parameter

#default_value, #name, #no_echo, #type

Attributes inherited from DslBase

#config

Instance Method Summary collapse

Methods inherited from Parameter

#initialize

Methods inherited from DslBase

#initialize

Constructor Details

This class inherits a constructor from Highlander::Dsl::Parameter

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



86
87
88
89
90
91
92
93
# File 'lib/highlander.dsl.params.rb', line 86

def method_missing(method, *args)
  smethod = "#{method}"
  if smethod.start_with?('Map')
    puts smethod
  end

  super.method_missing(method)
end

Instance Attribute Details

#mapAttribute ⇒ Object

Returns the value of attribute mapAttribute.



84
85
86
# File 'lib/highlander.dsl.params.rb', line 84

def mapAttribute
  @mapAttribute
end

#mapKey ⇒ Object

Returns the value of attribute mapKey.



84
85
86
# File 'lib/highlander.dsl.params.rb', line 84

def mapKey
  @mapKey
end

#mapName ⇒ Object

Returns the value of attribute mapName.



84
85
86
# File 'lib/highlander.dsl.params.rb', line 84

def mapName
  @mapName
end

Instance Method Details

#attribute(key) ⇒ Object



99
100
101
# File 'lib/highlander.dsl.params.rb', line 99

def attribute(key)
  @mapAttribute = key
end

#key(map_key) ⇒ Object



95
96
97
# File 'lib/highlander.dsl.params.rb', line 95

def key(map_key)
  @mapKey = map_key
end

#map(mapName) ⇒ Object



103
104
105
# File 'lib/highlander.dsl.params.rb', line 103

def map(mapName)
  @mapName = mapName
end

#mapProvider ⇒ Object



107
108
109
# File 'lib/highlander.dsl.params.rb', line 107

def mapProvider
  mappings_provider(@mapName)
end