Class: Argyle::Prototype

Inherits:
Object
  • Object
show all
Defined in:
lib/argyle/prototype.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#klassObject (readonly)

Returns the value of attribute klass.



2
3
4
# File 'lib/argyle/prototype.rb', line 2

def klass
  @klass
end

#parametersObject (readonly)

Returns the value of attribute parameters.



2
3
4
# File 'lib/argyle/prototype.rb', line 2

def parameters
  @parameters
end

Instance Method Details

#unwrapObject



9
10
11
# File 'lib/argyle/prototype.rb', line 9

def unwrap
  klass.new(**parameters)
end