Class: Meteorlog::DSL::Context
- Inherits:
-
Object
- Object
- Meteorlog::DSL::Context
- Includes:
- Validator
- 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 Validator
#_call_once, #_expected_length, #_expected_type, #_identify, #_required, #_validate
Constructor Details
#initialize(path, options = {}, &block) ⇒ Context
Returns a new instance of Context.
14 15 16 17 18 19 20 |
# File 'lib/meteorlog/dsl/context.rb', line 14 def initialize(path, = {}, &block) @path = path = @result = OpenStruct.new(:log_groups => []) @log_group_names = [] instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (readonly)
of class methods
12 13 14 |
# File 'lib/meteorlog/dsl/context.rb', line 12 def result @result end |
Class Method Details
.eval(dsl, path, opts = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/meteorlog/dsl/context.rb', line 5 def eval(dsl, path, opts = {}) self.new(path, opts) { eval(dsl, binding, path) } end |