Class: BSV::Registry::BasketDefinitionData

Inherits:
Object
  • Object
show all
Defined in:
lib/bsv/registry/types.rb

Overview

Registry data for a basket definition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(basket_id:, name:, icon_url:, description:, documentation_url:, registry_operator: nil) ⇒ BasketDefinitionData

Returns a new instance of BasketDefinitionData.

Parameters:

  • basket_id (String)
  • name (String)
  • icon_url (String)
  • description (String)
  • documentation_url (String)
  • registry_operator (String, nil) (defaults to: nil)


84
85
86
87
88
89
90
91
92
93
# File 'lib/bsv/registry/types.rb', line 84

def initialize(basket_id:, name:, icon_url:, description:, documentation_url:,
               registry_operator: nil)
  @definition_type   = DefinitionType::BASKET
  @basket_id         = basket_id
  @name              = name
  @icon_url          = icon_url
  @description       = description
  @documentation_url = documentation_url
  @registry_operator = registry_operator
end

Instance Attribute Details

#basket_idString (readonly)

Returns unique basket identifier.

Returns:

  • (String)

    unique basket identifier



61
62
63
# File 'lib/bsv/registry/types.rb', line 61

def basket_id
  @basket_id
end

#definition_typeString (readonly)

Returns always DefinitionType::BASKET.

Returns:

  • (String)

    always DefinitionType::BASKET



58
59
60
# File 'lib/bsv/registry/types.rb', line 58

def definition_type
  @definition_type
end

#descriptionString (readonly)

Returns description of the basket’s purpose.

Returns:

  • (String)

    description of the basket’s purpose



70
71
72
# File 'lib/bsv/registry/types.rb', line 70

def description
  @description
end

#documentation_urlString (readonly)

Returns URL to the basket documentation.

Returns:

  • (String)

    URL to the basket documentation



73
74
75
# File 'lib/bsv/registry/types.rb', line 73

def documentation_url
  @documentation_url
end

#icon_urlString (readonly)

Returns URL or opaque string for the basket icon.

Returns:

  • (String)

    URL or opaque string for the basket icon



67
68
69
# File 'lib/bsv/registry/types.rb', line 67

def icon_url
  @icon_url
end

#nameString (readonly)

Returns human-readable name.

Returns:

  • (String)

    human-readable name



64
65
66
# File 'lib/bsv/registry/types.rb', line 64

def name
  @name
end

#registry_operatorString? (readonly)

Returns public key hex of the registry operator.

Returns:

  • (String, nil)

    public key hex of the registry operator



76
77
78
# File 'lib/bsv/registry/types.rb', line 76

def registry_operator
  @registry_operator
end