Class: LcpRuby::Dsl::DslLoader::PresenterEvalContext

Inherits:
Object
  • Object
show all
Defined in:
lib/lcp_ruby/dsl/dsl_loader.rb

Overview

Isolated evaluation context for presenter DSL files.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePresenterEvalContext

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

#entriesObject (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