1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vcloud/model.rb

23 lines
341 B
Ruby
Raw Normal View History

2010-05-16 12:09:25 -04:00
module Fog
class Vcloud < Fog::Service
2010-05-16 12:09:25 -04:00
class Model < Fog::Model
attr_accessor :loaded
alias_method :loaded?, :loaded
2010-05-16 12:09:25 -04:00
def reload
2010-06-30 00:15:36 -04:00
instance = super
@loaded = true
2010-06-30 00:15:36 -04:00
instance
2010-05-16 12:09:25 -04:00
end
def load_unless_loaded!
unless @loaded
reload
2010-05-16 12:09:25 -04:00
end
end
end
end
end