class YAML::DomainType
Constants
- CLOUDFORMATION_FUNCTION_REGEX
Attributes
domain[RW]
type_id[RW]
value[RW]
Public Class Methods
create(type_id, value)
click to toggle source
# File lib/cfoo/yaml.rb, line 14 def self.create(type_id, value) type = self.allocate type.domain = "yaml.org,2002" type.type_id = type_id type.value = value type end
Public Instance Methods
==(other)
click to toggle source
# File lib/cfoo/yaml.rb, line 22 def ==(other) eq? other end
eq?(other)
click to toggle source
# File lib/cfoo/yaml.rb, line 26 def eq?(other) if other.respond_to?(:domain) && other.respond_to?(:type_id) && other.respond_to?(:value) domain == other.domain && type_id == other.type_id && value == other.value else false end end
expand_el()
click to toggle source
Calls superclass method
Object#expand_el
# File lib/cfoo/parser.rb, line 64 def expand_el case type_id when "Ref" { "Ref" => value.expand_el } when "GetAZs" if value.nil? { "Fn::GetAZs" => "" } else { "Fn::GetAZs" => value.expand_el } end when CLOUDFORMATION_FUNCTION_REGEX { "Fn::#{type_id}" => value.expand_el } when "Concat" { "Fn::Join" => ['', value.expand_el] } else super end end