Class: Rockbox::PluginContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/rockbox/plugin.rb

Overview

Context handed to a plugin’s #install method. Plugins can issue raw GraphQL queries and subscribe to the same event stream the SDK uses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#eventsObject

Returns the value of attribute events

Returns:

  • (Object)

    the current value of events



6
7
8
# File 'lib/rockbox/plugin.rb', line 6

def events
  @events
end

#queryObject

Returns the value of attribute query

Returns:

  • (Object)

    the current value of query



6
7
8
# File 'lib/rockbox/plugin.rb', line 6

def query
  @query
end

Instance Method Details

#query!(*args, **kwargs) ⇒ Object



7
8
9
# File 'lib/rockbox/plugin.rb', line 7

def query!(*args, **kwargs)
  query.call(*args, **kwargs)
end