Module: Crabfarm::Live::Interactable

Included in:
BaseNavigator, BaseReducer
Defined in:
lib/crabfarm/live/interactable.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



5
6
7
# File 'lib/crabfarm/live/interactable.rb', line 5

def self.included(klass)
  klass.extend ClassMethods
end

Instance Method Details

#examine(_tools = true) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/crabfarm/live/interactable.rb', line 30

def examine(_tools=true)
  if Crabfarm.live?
    Crabfarm.live.show_primary_contents if self.is_a? BaseNavigator
    Crabfarm.live.show_content raw_document if self.is_a? BaseReducer
    Crabfarm.live.show_selector_gadget if _tools
    raise LiveInterrupted.new
  end
end