Module: Schema::Controls::Schema
- Defined in:
- lib/schema/controls/schema.rb
Defined Under Namespace
Modules: Boolean, DefaultValue, Duplicate, Equivalent, TransientAttributes, Typed, Validation
Classes: Example, OtherExample
Class Method Summary
collapse
Class Method Details
.ancestors ⇒ Object
18
19
20
|
# File 'lib/schema/controls/schema.rb', line 18
def self.ancestors
example.class.ancestors
end
|
.attributes ⇒ Object
22
23
24
|
# File 'lib/schema/controls/schema.rb', line 22
def self.attributes
example.attributes
end
|
.example ⇒ Object
4
5
6
7
8
9
|
# File 'lib/schema/controls/schema.rb', line 4
def self.example
example = Example.new
example.some_attribute = 'some value'
example.some_other_attribute = 'some other value'
example
end
|
.hash ⇒ Object
26
27
28
|
# File 'lib/schema/controls/schema.rb', line 26
def self.hash
example.to_h
end
|
.other_example ⇒ Object
11
12
13
14
15
16
|
# File 'lib/schema/controls/schema.rb', line 11
def self.other_example
example = OtherExample.new
example.some_attribute = 'some value'
example.some_other_attribute = 'some other value'
example
end
|