Class: Datory::Attributes::Options::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/datory/attributes/options/base.rb

Direct Known Subclasses

From

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, consists_of:, min:, max:, format:) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
14
15
16
# File 'lib/datory/attributes/options/base.rb', line 9

def initialize(name:, type:, consists_of:, min:, max:, format:)
  @name = name
  @type = type
  @consists_of = consists_of
  @min = min
  @max = max
  @format = format
end

Instance Attribute Details

#consists_ofObject (readonly)

Returns the value of attribute consists_of.



7
8
9
# File 'lib/datory/attributes/options/base.rb', line 7

def consists_of
  @consists_of
end

#formatObject (readonly)

Returns the value of attribute format.



7
8
9
# File 'lib/datory/attributes/options/base.rb', line 7

def format
  @format
end

#maxObject (readonly)

Returns the value of attribute max.



7
8
9
# File 'lib/datory/attributes/options/base.rb', line 7

def max
  @max
end

#minObject (readonly)

Returns the value of attribute min.



7
8
9
# File 'lib/datory/attributes/options/base.rb', line 7

def min
  @min
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/datory/attributes/options/base.rb', line 7

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/datory/attributes/options/base.rb', line 7

def type
  @type
end

Instance Method Details

#infoObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/datory/attributes/options/base.rb', line 18

def info
  {
    name:,
    type:,
    min:,
    max:,
    consists_of:,
    format:
  }
end