Class: Argyle::Prototype
- Inherits:
-
Object
- Object
- Argyle::Prototype
- Defined in:
- lib/argyle/prototype.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Instance Method Summary collapse
-
#initialize(klass, parameters) ⇒ Prototype
constructor
A new instance of Prototype.
- #unwrap ⇒ Object
Constructor Details
#initialize(klass, parameters) ⇒ Prototype
Returns a new instance of Prototype.
4 5 6 7 |
# File 'lib/argyle/prototype.rb', line 4 def initialize(klass, parameters) @klass = klass @parameters = parameters end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
2 3 4 |
# File 'lib/argyle/prototype.rb', line 2 def klass @klass end |
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
2 3 4 |
# File 'lib/argyle/prototype.rb', line 2 def parameters @parameters end |
Instance Method Details
#unwrap ⇒ Object
9 10 11 |
# File 'lib/argyle/prototype.rb', line 9 def unwrap klass.new(**parameters) end |