Class: DatagroutConduit::GuideOption

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



178
179
180
# File 'lib/datagrout_conduit/types.rb', line 178

def description
  @description
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



178
179
180
# File 'lib/datagrout_conduit/types.rb', line 178

def id
  @id
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



178
179
180
# File 'lib/datagrout_conduit/types.rb', line 178

def label
  @label
end

Class Method Details

.from_hash(hash) ⇒ Object



179
180
181
182
# File 'lib/datagrout_conduit/types.rb', line 179

def self.from_hash(hash)
  hash = hash.transform_keys(&:to_s)
  new(id: hash["id"], label: hash["label"], description: hash["description"])
end