Module: Schema::Controls::Schema
- Defined in:
- lib/schema/controls/schema.rb,
lib/schema/controls/schema/different.rb
Defined Under Namespace
Modules: Attributes, Boolean, Check, DefaultValue, Different, Duplicate, Equivalent, Random, TransientAttributes, Typed, Validation
Classes: Example, OtherExample
Class Method Summary
collapse
Class Method Details
.ancestors ⇒ Object
26
27
28
|
# File 'lib/schema/controls/schema.rb', line 26
def self.ancestors
example.class.ancestors
end
|
.attribute_names ⇒ Object
34
35
36
|
# File 'lib/schema/controls/schema.rb', line 34
def self.attribute_names
example.class.attribute_names
end
|
.attributes ⇒ Object
30
31
32
|
# File 'lib/schema/controls/schema.rb', line 30
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_attribute
example.some_other_attribute = some_other_attribute
example
end
|
.hash ⇒ Object
38
39
40
|
# File 'lib/schema/controls/schema.rb', line 38
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_attribute
example.some_other_attribute = some_other_attribute
example
end
|
.some_other_attribute ⇒ Object