Class: Cadenya::Types::Reasoning

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content: nil) ⇒ Reasoning

Returns a new instance of Reasoning.



4685
4686
4687
# File 'lib/cadenya/types.rb', line 4685

def initialize(content: nil)
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



4683
4684
4685
# File 'lib/cadenya/types.rb', line 4683

def content
  @content
end

Class Method Details

.from_json(data) ⇒ Object



4689
4690
4691
4692
4693
# File 'lib/cadenya/types.rb', line 4689

def self.from_json(data)
  new(
    content: data["content"],
  )
end

Instance Method Details

#to_hObject



4695
4696
4697
4698
4699
# File 'lib/cadenya/types.rb', line 4695

def to_h
  {
    content: Util.plain(@content),
  }.reject { |_k, v| v.nil? }
end