Class: Vial::Definition::RecordContext
- Inherits:
-
Object
- Object
- Vial::Definition::RecordContext
- Defined in:
- lib/vial/definition.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#variant ⇒ Object
readonly
Returns the value of attribute variant.
Instance Method Summary collapse
- #erb(source) ⇒ Object
-
#initialize(definition, label:, variant:, index:) ⇒ RecordContext
constructor
A new instance of RecordContext.
- #sequence(name) ⇒ Object
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
#index ⇒ Object (readonly)
Returns the value of attribute index.
461 462 463 |
# File 'lib/vial/definition.rb', line 461 def index @index end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
461 462 463 |
# File 'lib/vial/definition.rb', line 461 def label @label end |
#variant ⇒ Object (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 |