Class: PairKit::JsonSchema::Dsl::Scaffold

Inherits:
Object
  • Object
show all
Defined in:
lib/pair_kit/json_schema/dsl/scaffolds/scaffold.rb

Direct Known Subclasses

ArrayScaffold, HashScaffold, ScalarScaffold

Class Method Summary collapse

Class Method Details

.wrap(val) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/pair_kit/json_schema/dsl/scaffolds/scaffold.rb', line 5

def self.wrap(val)
  case val
  when Scaffold then val
  when Hash then HashScaffold.new(val)
  when Array then ArrayScaffold.new(val)
  else ScalarScaffold.new(val)
  end
end