Class: Pluct::LinkDescriptionObject
- Inherits:
-
Object
- Object
- Pluct::LinkDescriptionObject
- Defined in:
- lib/pluct/link_description_object.rb
Instance Method Summary collapse
- #expand_href(mapping) ⇒ Object
-
#initialize(raw_link) ⇒ LinkDescriptionObject
constructor
A new instance of LinkDescriptionObject.
- #unused_mapping(orig_mapping) ⇒ Object
Constructor Details
#initialize(raw_link) ⇒ LinkDescriptionObject
Returns a new instance of LinkDescriptionObject.
3 4 5 |
# File 'lib/pluct/link_description_object.rb', line 3 def initialize(raw_link) @href = raw_link["href"] end |
Instance Method Details
#expand_href(mapping) ⇒ Object
7 8 9 |
# File 'lib/pluct/link_description_object.rb', line 7 def (mapping) template.(mapping).to_s end |
#unused_mapping(orig_mapping) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/pluct/link_description_object.rb', line 11 def unused_mapping(orig_mapping) mapping = orig_mapping.dup = self.(mapping) used_mapping = template.extract() mapping.delete_if { |key, value| used_mapping.include?(key.to_s) } end |