Cross Reference: action_caller.rb
xref
: /
ontohub
/
lib
/
hets
/
action_caller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
module
Hets
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
class
ActionCaller
<
Caller
2f305d7bc01ae84f6b219b562fe4d31392abc1d6
Eugen Kuksa
attr_accessor
:
hets_options
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
2f305d7bc01ae84f6b219b562fe4d31392abc1d6
Eugen Kuksa
def
initialize
(
hets_instance
,
hets_options
)
2f305d7bc01ae84f6b219b562fe4d31392abc1d6
Eugen Kuksa
self.hets
_options
=
hets_options
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
msg
=
"<#{hets_instance}> not up."
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
raise
Hets
::
InactiveInstanceError
,
msg
unless
hets_instance.try
(:
up
?)
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
super
(
hets_instance
)
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
end
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
def
build_query_string
2f305d7bc01ae84f6b219b562fe4d31392abc1d6
Eugen Kuksa
hets_options.options
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
end
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
def
handle_possible_hets_error
(
error
)
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
HetsErrorProcess.new
(
error
)
.
handle
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
rescue
Hets
::
NotAHetsError
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
raise
error
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
end
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
end
e4d81151f4841a6354d043551a970418b32be02a
Eugen Kuksa
end