Class: Cadenya::Types::WorkspaceSpec

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(description: nil) ⇒ WorkspaceSpec

Returns a new instance of WorkspaceSpec.



7656
7657
7658
# File 'lib/cadenya/types.rb', line 7656

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

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



7654
7655
7656
# File 'lib/cadenya/types.rb', line 7654

def description
  @description
end

Class Method Details

.from_json(data) ⇒ Object



7660
7661
7662
7663
7664
# File 'lib/cadenya/types.rb', line 7660

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

Instance Method Details

#to_hObject



7666
7667
7668
7669
7670
# File 'lib/cadenya/types.rb', line 7666

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