Class: Paramore::Field
- Inherits:
-
Object
- Object
- Paramore::Field
- Defined in:
- lib/paramore/field.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ null: false, compact: false, default: nil, }.freeze
Instance Method Summary collapse
- #compact? ⇒ Boolean
- #default ⇒ Object
-
#initialize(given_type, null:, compact:, default:) ⇒ Field
constructor
A new instance of Field.
- #nullable? ⇒ Boolean
- #type ⇒ Object
Constructor Details
#initialize(given_type, null:, compact:, default:) ⇒ Field
Returns a new instance of Field.
9 10 11 12 13 14 |
# File 'lib/paramore/field.rb', line 9 def initialize(given_type, null:, compact:, default:) @given_type = given_type @nullable = null @compact = compact @default = default end |
Instance Method Details
#default ⇒ Object
16 17 18 |
# File 'lib/paramore/field.rb', line 16 def default @default end |
#type ⇒ Object
28 29 30 |
# File 'lib/paramore/field.rb', line 28 def type @given_type end |