Class: Interfacets::Shared::GeneratedStore::Spec

Inherits:
Object
  • Object
show all
Defined in:
lib/interfacets/shared/generated_store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, klass:, type:) ⇒ Spec

Returns a new instance of Spec.



74
75
76
77
78
# File 'lib/interfacets/shared/generated_store.rb', line 74

def initialize(name:, klass:, type:)
  @name = name
  @klass = klass
  @type = type
end

Instance Attribute Details

#klass ⇒ Object (readonly)

Returns the value of attribute klass.



73
74
75
# File 'lib/interfacets/shared/generated_store.rb', line 73

def klass
  @klass
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



73
74
75
# File 'lib/interfacets/shared/generated_store.rb', line 73

def name
  @name
end

#type ⇒ Object (readonly)

Returns the value of attribute type.



73
74
75
# File 'lib/interfacets/shared/generated_store.rb', line 73

def type
  @type
end

Instance Method Details

#build ⇒ Object



80
81
82
# File 'lib/interfacets/shared/generated_store.rb', line 80

def build
  spec.klass.new
end