Class: LcpRuby::Dsl::DslLoader::ViewGroupEvalContext
- Inherits:
-
Object
- Object
- LcpRuby::Dsl::DslLoader::ViewGroupEvalContext
- Defined in:
- lib/lcp_ruby/dsl/dsl_loader.rb
Overview
Isolated evaluation context for view group DSL files.
Instance Attribute Summary collapse
-
#view_group_definitions ⇒ Object
readonly
Returns the value of attribute view_group_definitions.
Instance Method Summary collapse
- #define_view_group(name, &block) ⇒ Object
-
#initialize ⇒ ViewGroupEvalContext
constructor
A new instance of ViewGroupEvalContext.
Constructor Details
#initialize ⇒ ViewGroupEvalContext
Returns a new instance of ViewGroupEvalContext.
305 306 307 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 305 def initialize @view_group_definitions = [] end |
Instance Attribute Details
#view_group_definitions ⇒ Object (readonly)
Returns the value of attribute view_group_definitions.
303 304 305 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 303 def view_group_definitions @view_group_definitions end |
Instance Method Details
#define_view_group(name, &block) ⇒ Object
309 310 311 312 313 314 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 309 def define_view_group(name, &block) builder = ViewGroupBuilder.new(name) builder.instance_eval(&block) hash = builder.to_hash @view_group_definitions << Metadata::ViewGroupDefinition.from_hash(hash) end |