Module: Convection::Model::Mixin::Conditional

Included in:
Template::Output, Template::Resource
Defined in:
lib/convection/model/mixin/conditional.rb

Overview

Add condition helpers

Instance Method Summary collapse

Instance Method Details

#condition(setter = nil) ⇒ Object



8
9
10
11
# File 'lib/convection/model/mixin/conditional.rb', line 8

def condition(setter = nil)
  @condition = setter unless setter.nil?
  @condition
end

#render_condition(resource) ⇒ Object



13
14
15
# File 'lib/convection/model/mixin/conditional.rb', line 13

def render_condition(resource)
  resource['Condition'] = condition unless condition.nil?
end