Class: LHS::Record::Chainable::Link

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

Overview

Link: A part of a chain

Direct Known Subclasses

ErrorHandling, Option, Pagination, Parameter

Instance Method Summary collapse

Constructor Details

#initialize(hash = nil) ⇒ Link

Returns a new instance of Link.



41
42
43
# File 'lib/lhs/concerns/record/chainable.rb', line 41

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

Instance Method Details

#[](parameter) ⇒ Object



45
46
47
# File 'lib/lhs/concerns/record/chainable.rb', line 45

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

#to_hashObject



49
50
51
# File 'lib/lhs/concerns/record/chainable.rb', line 49

def to_hash
  @hash
end