Class: LcpRuby::Dsl::DslLoader::PresenterEvalContext
- Inherits:
-
Object
- Object
- LcpRuby::Dsl::DslLoader::PresenterEvalContext
- Defined in:
- lib/lcp_ruby/dsl/dsl_loader.rb
Overview
Isolated evaluation context for presenter DSL files.
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Instance Method Summary collapse
- #define_presenter(name, inherits: nil, &block) ⇒ Object
-
#initialize ⇒ PresenterEvalContext
constructor
A new instance of PresenterEvalContext.
Constructor Details
#initialize ⇒ PresenterEvalContext
Returns a new instance of PresenterEvalContext.
353 354 355 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 353 def initialize @entries = [] end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
351 352 353 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 351 def entries @entries end |
Instance Method Details
#define_presenter(name, inherits: nil, &block) ⇒ Object
357 358 359 360 361 |
# File 'lib/lcp_ruby/dsl/dsl_loader.rb', line 357 def define_presenter(name, inherits: nil, &block) builder = PresenterBuilder.new(name) builder.instance_eval(&block) @entries << { name: name.to_s, inherits: inherits&.to_s, builder: builder } end |