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



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

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



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

def value
  @value
end

Class Method Details

.from(acme_identifier) ⇒ Object



125
126
127
# File 'lib/puma/acme/structs.rb', line 125

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

.parse(value) ⇒ Object



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

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

Instance Method Details

#keyObject



129
130
131
# File 'lib/puma/acme/structs.rb', line 129

def key
  [:identifier, type, value]
end