Class: Portage::Ucp::Link
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::Link
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/link.json
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(type:, url:, title: nil) ⇒ Link
constructor
A new instance of Link.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(type:, url:, title: nil) ⇒ Link
Returns a new instance of Link.
43 |
# File 'lib/portage/ucp/value_objects.rb', line 43 def initialize(type:, url:, title: nil) = super |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title
42 43 44 |
# File 'lib/portage/ucp/value_objects.rb', line 42 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type
42 43 44 |
# File 'lib/portage/ucp/value_objects.rb', line 42 def type @type end |
#url ⇒ Object (readonly)
Returns the value of attribute url
42 43 44 |
# File 'lib/portage/ucp/value_objects.rb', line 42 def url @url end |
Instance Method Details
#to_wire_h ⇒ Object
45 46 47 48 49 |
# File 'lib/portage/ucp/value_objects.rb', line 45 def to_wire_h h = { "type" => type, "url" => url } h["title"] = title if title h end |