Class: Pickpoint::DeviceInput

Inherits:
Struct
  • Object
show all
Defined in:
lib/pickpoint/devices.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



31
32
33
# File 'lib/pickpoint/devices.rb', line 31

def description
  @description
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



31
32
33
# File 'lib/pickpoint/devices.rb', line 31

def 
  @metadata
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



31
32
33
# File 'lib/pickpoint/devices.rb', line 31

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



31
32
33
# File 'lib/pickpoint/devices.rb', line 31

def type
  @type
end

Instance Method Details

#to_hObject



32
33
34
35
36
37
# File 'lib/pickpoint/devices.rb', line 32

def to_h
  out = { "name" => name, "type" => type }
  out["description"] = description unless description.nil?
  out["metadata"] =  unless .nil?
  out
end