Class: Sfn::Command::Graph::GraphProcessor
- Inherits:
-
SparkleFormation::Translation
- Object
- SparkleFormation::Translation
- Sfn::Command::Graph::GraphProcessor
- Defined in:
- lib/sfn/command/graph.rb
Constant Summary collapse
- MAP =
{}
- REF_MAPPING =
{}
- FN_MAPPING =
{}
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #apply_function(hash, funcs = []) ⇒ Object
-
#initialize(template, args = {}) ⇒ GraphProcessor
constructor
A new instance of GraphProcessor.
Constructor Details
#initialize(template, args = {}) ⇒ GraphProcessor
Returns a new instance of GraphProcessor.
244 245 246 247 |
# File 'lib/sfn/command/graph.rb', line 244 def initialize(template, args={}) super @name = args[:name] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
242 243 244 |
# File 'lib/sfn/command/graph.rb', line 242 def name @name end |
Instance Method Details
#apply_function(hash, funcs = []) ⇒ Object
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/sfn/command/graph.rb', line 249 def apply_function(hash, funcs=[]) k, v = hash.first if(hash.size == 1) case k when 'Ref' parameters.key?(v) ? parameters[v] : hash when 'Fn::Join' v.last when 'Fn::Select' v.last[v.first.to_i] else hash end else hash end end |