Class: Fried::Schema::GetDefinition

Inherits:
Object
  • Object
show all
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

.buildObject



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

Parameters:

Returns:



17
18
19
# File 'lib/fried/schema/get_definition.rb', line 17

def call(obj)
  obj.instance_variable_get(:@__fried_schema__)
end