Class: SSO::Elements::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/sso/elements/field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, value, index) ⇒ Field

Returns a new instance of Field.



8
9
10
11
12
# File 'lib/sso/elements/field.rb', line 8

def initialize(type, value, index)
  @type = type
  @value = value
  @index = index
end

Instance Attribute Details

#indexObject

Returns the value of attribute index.



4
5
6
# File 'lib/sso/elements/field.rb', line 4

def index
  @index
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/sso/elements/field.rb', line 4

def type
  @type
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/sso/elements/field.rb', line 4

def value
  @value
end

Instance Method Details

#compactObject



14
15
16
17
18
19
# File 'lib/sso/elements/field.rb', line 14

def compact
  {
    type: @type,
    value: @value
  }
end