Class: Fried::Schema::GetDefinition
- Inherits:
-
Object
- Object
- Fried::Schema::GetDefinition
- Defined in:
- lib/fried/schema/get_definition.rb
Overview
Get schema definition from Struct
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build ⇒ Object
6 7 8 |
# File 'lib/fried/schema/get_definition.rb', line 6 def self.build new end |
.call(obj) ⇒ Object
10 11 12 13 |
# File 'lib/fried/schema/get_definition.rb', line 10 def self.call(obj) instance = build instance.(obj) end |
Instance Method Details
#call(obj) ⇒ Definition
17 18 19 |
# File 'lib/fried/schema/get_definition.rb', line 17 def call(obj) obj.instance_variable_get(:@__fried_schema__) end |