Class: MotionBlender::Interpreters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/motion_blender/interpreters/base.rb

Direct Known Subclasses

OriginalInterpreter, RequireInterpreter

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collector) ⇒ Base

Returns a new instance of Base.



30
31
32
# File 'lib/motion_blender/interpreters/base.rb', line 30

def initialize collector
  @collector = collector
end

Class Attribute Details

.methodObject (readonly)

Returns the value of attribute method.



7
8
9
# File 'lib/motion_blender/interpreters/base.rb', line 7

def method
  @method
end

.receiverObject (readonly)

Returns the value of attribute receiver.



7
8
9
# File 'lib/motion_blender/interpreters/base.rb', line 7

def receiver
  @receiver
end

Instance Attribute Details

#collectorObject (readonly)

Returns the value of attribute collector.



24
25
26
# File 'lib/motion_blender/interpreters/base.rb', line 24

def collector
  @collector
end

#objectObject

Returns the value of attribute object.



25
26
27
# File 'lib/motion_blender/interpreters/base.rb', line 25

def object
  @object
end

Class Method Details

.interprets(method, options = {}) ⇒ Object



9
10
11
12
13
# File 'lib/motion_blender/interpreters/base.rb', line 9

def interprets method, options = {}
  @method = method
  @receiver = options[:receiver] || Object
  Collector.register self
end

.keyObject



15
16
17
# File 'lib/motion_blender/interpreters/base.rb', line 15

def key
  [@receiver, @method]
end

.requirable?(_) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/motion_blender/interpreters/base.rb', line 19

def requirable? _
  false
end