Class: Yeti::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/yeti/context.rb

Defined Under Namespace

Classes: NoAccount

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Context

Returns a new instance of Context.



9
10
11
# File 'lib/yeti/context.rb', line 9

def initialize(hash={})
  @hash = hash
end

Instance Method Details

#accountObject



13
14
15
16
17
18
# File 'lib/yeti/context.rb', line 13

def 
  @account ||= begin
     = hash[:account_id]
    (  if ) || 
  end
end

#find_account_by_id(id) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/yeti/context.rb', line 20

def (id)
  raise NotImplementedError, "#{self.class}#find_account_by_id"
end