class Fried::Schema::GetDefinition
Get schema definition from {Struct}
Public Class Methods
build()
click to toggle source
# File lib/fried/schema/get_definition.rb, line 6 def self.build new end
call(obj)
click to toggle source
# File lib/fried/schema/get_definition.rb, line 10 def self.call(obj) instance = build instance.(obj) end
Public Instance Methods
call(obj)
click to toggle source
@param obj [Class] a {Struct} or {DataEntity} class @return [Definition]
# File lib/fried/schema/get_definition.rb, line 17 def call(obj) obj.instance_variable_get(:@__fried_schema__) end