Class: Cloudruler::Template::EvalContext

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudruler/template.rb

Instance Method Summary collapse

Constructor Details

#initialize(template) ⇒ EvalContext

Returns a new instance of EvalContext.



50
51
52
# File 'lib/cloudruler/template.rb', line 50

def initialize(template)
  @template = template
end

Instance Method Details

#description(description) ⇒ Object



64
65
66
# File 'lib/cloudruler/template.rb', line 64

def description(description)
  @template.description = description
end

#format_version(format_version) ⇒ Object



60
61
62
# File 'lib/cloudruler/template.rb', line 60

def format_version(format_version)
  @template.format_version = format_version
end

#ruler(ruler_name, options = {}, &block) ⇒ Object



54
55
56
57
58
# File 'lib/cloudruler/template.rb', line 54

def ruler(ruler_name, options = {}, &block)
  resolved_ruler = @template.resolve_ruler(ruler_name, options, &block)
  @template.rulers << resolved_ruler
  resolved_ruler
end