Class: Meteorlog::DSL::Context
- Inherits:
-
Object
- Object
- Meteorlog::DSL::Context
- Includes:
- Validator, TemplateHelper
- Defined in:
- lib/meteorlog/dsl/context.rb
Defined Under Namespace
Classes: LogGroup, MetricFilter
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
of class methods.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path, options = {}, &block) ⇒ Context
constructor
A new instance of Context.
Methods included from TemplateHelper
Methods included from Validator
#_call_once, #_expected_length, #_expected_type, #_identify, #_required, #_validate
Constructor Details
#initialize(path, options = {}, &block) ⇒ Context
Returns a new instance of Context.
15 16 17 18 19 20 21 |
# File 'lib/meteorlog/dsl/context.rb', line 15 def initialize(path, = {}, &block) @path = path @options = @result = OpenStruct.new(:log_groups => []) @log_group_names = [] instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (readonly)
of class methods
13 14 15 |
# File 'lib/meteorlog/dsl/context.rb', line 13 def result @result end |
Class Method Details
.eval(dsl, path, opts = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/meteorlog/dsl/context.rb', line 6 def eval(dsl, path, opts = {}) self.new(path, opts) { eval(dsl, binding, path) } end |