Class: LIT::Builder::Array Private
- Inherits:
-
Object
- Object
- LIT::Builder::Array
- Defined in:
- lib/lit/builder/array.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #build ⇒ Object private
-
#initialize(mod, type) ⇒ Array
constructor
private
A new instance of Array.
Constructor Details
#initialize(mod, type) ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Array.
8 9 10 11 |
# File 'lib/lit/builder/array.rb', line 8 def initialize(mod, type) @type_checker = TypeChecker.new(mod) @type = type end |
Instance Method Details
#build ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/lit/builder/array.rb', line 13 def build type_checker = @type_checker type = @type Class.new(::LIT::Object::Array) do define_method(:check_type!) do |value| type_checker.check_type!(type, value) end private(:check_type!) end end |