Class: Scheming::Attribute
- Inherits:
-
Object
- Object
- Scheming::Attribute
show all
- Defined in:
- lib/scheming/attribute.rb
Overview
Defined Under Namespace
Classes: List, ListBuilder
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(field_name:, type:, is_required: true) ⇒ Attribute
Returns a new instance of Attribute.
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/scheming/attribute.rb', line 17
def initialize(
field_name:,
type:,
is_required: true
)
@field_name = field_name
@type = type
@is_required = is_required
freeze
end
|
Instance Attribute Details
#field_name ⇒ Symbol
7
8
9
|
# File 'lib/scheming/attribute.rb', line 7
def field_name
@field_name
end
|
#is_required ⇒ Boolean
13
14
15
|
# File 'lib/scheming/attribute.rb', line 13
def is_required
@is_required
end
|
10
11
12
|
# File 'lib/scheming/attribute.rb', line 10
def type
@type
end
|