Class: SpotFeel::Dmn::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/spot_feel/dmn/output.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, label:, name:, type_ref:) ⇒ Output

Returns a new instance of Output.



12
13
14
15
16
17
# File 'lib/spot_feel/dmn/output.rb', line 12

def initialize(id:, label:, name:, type_ref:)
  @id = id
  @label = label
  @name = name
  @type_ref = type_ref
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/spot_feel/dmn/output.rb', line 6

def id
  @id
end

#labelObject (readonly)

Returns the value of attribute label.



6
7
8
# File 'lib/spot_feel/dmn/output.rb', line 6

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/spot_feel/dmn/output.rb', line 6

def name
  @name
end

#type_refObject (readonly)

Returns the value of attribute type_ref.



6
7
8
# File 'lib/spot_feel/dmn/output.rb', line 6

def type_ref
  @type_ref
end

Class Method Details

.from_json(json) ⇒ Object



8
9
10
# File 'lib/spot_feel/dmn/output.rb', line 8

def self.from_json(json)
  Output.new(id: json[:id], label: json[:label], name: json[:name], type_ref: json[:type_ref])
end

Instance Method Details

#as_jsonObject



19
20
21
22
23
24
25
26
# File 'lib/spot_feel/dmn/output.rb', line 19

def as_json
  {
    id: id,
    label: label,
    name: name,
    type_ref: type_ref,
  }
end