Class: PatellaResult

Inherits:
ActiveSupport::BasicObject
Defined in:
lib/patella/patella.rb

Instance Method Summary collapse

Constructor Details

#initialize(target = nil, loading = false) ⇒ PatellaResult

Returns a new instance of PatellaResult.



113
114
115
116
# File 'lib/patella/patella.rb', line 113

def initialize(target=nil, loading=false)
  @target = target
  @loading = loading
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



126
127
128
# File 'lib/patella/patella.rb', line 126

def method_missing(method, *args, &block)
  @target.send(method, *args, &block)
end

Instance Method Details

#loaded?Boolean

Returns:

  • (Boolean)


122
123
124
# File 'lib/patella/patella.rb', line 122

def loaded?
  !@loading
end

#loading?Boolean

Returns:

  • (Boolean)


118
119
120
# File 'lib/patella/patella.rb', line 118

def loading?
  @loading
end