Module: CfnDsl

Defined in:
lib/cfndsl/Types.rb,
lib/cfndsl/names.rb,
lib/cfndsl/Errors.rb,
lib/cfndsl/Outputs.rb,
lib/cfndsl/Plurals.rb,
lib/cfndsl/JSONable.rb,
lib/cfndsl/Mappings.rb,
lib/cfndsl/Metadata.rb,
lib/cfndsl/Resources.rb,
lib/cfndsl/Conditions.rb,
lib/cfndsl/Parameters.rb,
lib/cfndsl/Properties.rb,
lib/cfndsl/UpdatePolicy.rb,
lib/cfndsl/CloudFormationTemplate.rb

Defined Under Namespace

Modules: Errors, Functions, Plurals, Types Classes: CloudFormationTemplate, ConditionDefinition, Fn, JSONable, MappingDefinition, MetadataDefinition, OutputDefinition, ParameterDefinition, PropertyDefinition, RefDefinition, ResourceDefinition, UpdatePolicyDefinition

Class Method Summary collapse

Class Method Details

.methodNames(name, &block) ⇒ Object

iterates through the the valid case-insensitive names for “name”.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/cfndsl/names.rb', line 5

def self.methodNames(name, &block)
  if block then
    name_str = name.to_s
    yield name_str.to_sym
    n = name_str.dup
    n[0] = n[0].swapcase
    yield n.to_sym
  else
    result = [name.dup,name.dup]
    result[1][0] = result[1][0].swapcase
    return result
  end
end