Class: DHS::Record::Chainable::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/dhs/concerns/record/chainable.rb

Overview

Link: A part of a chain

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = nil) ⇒ Link

Returns a new instance of Link.



87
88
89
# File 'lib/dhs/concerns/record/chainable.rb', line 87

def initialize(data = nil)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



85
86
87
# File 'lib/dhs/concerns/record/chainable.rb', line 85

def data
  @data
end

Instance Method Details

#[](parameter) ⇒ Object



91
92
93
# File 'lib/dhs/concerns/record/chainable.rb', line 91

def [](parameter)
  @data[parameter]
end