Class: Puma::Acme::Identifier

Inherits:
Struct
  • Object
show all
Defined in:
lib/puma/acme/structs.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



112
113
114
# File 'lib/puma/acme/structs.rb', line 112

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



112
113
114
# File 'lib/puma/acme/structs.rb', line 112

def value
  @value
end

Class Method Details

.from(acme_identifier) ⇒ Object



118
119
120
# File 'lib/puma/acme/structs.rb', line 118

def self.from(acme_identifier)
  new(acme_identifier.to_h.slice(*members.map(&:to_s)))
end

.parse(value) ⇒ Object



113
114
115
116
# File 'lib/puma/acme/structs.rb', line 113

def self.parse(value)
  # TODO: ip identifiers
  new(type: :dns, value: value)
end

Instance Method Details

#keyObject



122
123
124
# File 'lib/puma/acme/structs.rb', line 122

def key
  [:identifier, type, value]
end