Class: Atatus::Fields::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/atatus/fields.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, default: nil) ⇒ Field

Returns a new instance of Field.



37
38
39
40
# File 'lib/atatus/fields.rb', line 37

def initialize(key, default: nil)
  @key = key
  @default = default
end

Instance Attribute Details

#defaultObject (readonly)

Returns the value of attribute default.



42
43
44
# File 'lib/atatus/fields.rb', line 42

def default
  @default
end

#keyObject (readonly)

Returns the value of attribute key.



42
43
44
# File 'lib/atatus/fields.rb', line 42

def key
  @key
end