Class: Vial::Definition::RecordContext

Inherits:
Object
  • Object
show all
Defined in:
lib/vial/definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition, label:, variant:, index:) ⇒ RecordContext

Returns a new instance of RecordContext.



463
464
465
466
467
468
# File 'lib/vial/definition.rb', line 463

def initialize(definition, label:, variant:, index:)
  @definition = definition
  @label = label
  @variant = variant
  @index = index
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



461
462
463
# File 'lib/vial/definition.rb', line 461

def index
  @index
end

#labelObject (readonly)

Returns the value of attribute label.



461
462
463
# File 'lib/vial/definition.rb', line 461

def label
  @label
end

#variantObject (readonly)

Returns the value of attribute variant.



461
462
463
# File 'lib/vial/definition.rb', line 461

def variant
  @variant
end

Instance Method Details

#erb(source) ⇒ Object



474
475
476
# File 'lib/vial/definition.rb', line 474

def erb(source)
  Erb.new(source: source)
end

#sequence(name) ⇒ Object



470
471
472
# File 'lib/vial/definition.rb', line 470

def sequence(name)
  @definition.sequence(name)
end