Class: PMP::Links

Inherits:
HashWithIndifferentAccess
  • Object
show all
Includes:
Utils
Defined in:
lib/pmp/links.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#to_json_key_name, #to_ruby_safe_name

Constructor Details

#initialize(parent) ⇒ Links

Returns a new instance of Links.



10
11
12
13
# File 'lib/pmp/links.rb', line 10

def initialize(parent)
  super()
  self.parent = parent
end

Instance Attribute Details

#parentObject

Returns the value of attribute parent.



8
9
10
# File 'lib/pmp/links.rb', line 8

def parent
  @parent
end

Instance Method Details

#[]=(k, link) ⇒ Object



15
16
17
18
# File 'lib/pmp/links.rb', line 15

def []=(k, link)
  super
  parent.send("#{to_ruby_safe_name(k)}=", link)
end