Class: OFlow::Actor::Spec

Inherits:
Object
  • Object
show all
Defined in:
lib/oflow/actor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op, type) ⇒ Spec

Returns a new instance of Spec.



62
63
64
65
66
67
68
69
# File 'lib/oflow/actor.rb', line 62

def initialize(op, type)
  if op.nil? || op.is_a?(Symbol)
    @op = op
  else
    @op = op.to_sym
  end
  @type = type
end

Instance Attribute Details

#opObject (readonly) Also known as: dest

Returns the value of attribute op.



59
60
61
# File 'lib/oflow/actor.rb', line 59

def op
  @op
end

#typeObject (readonly)

Returns the value of attribute type.



60
61
62
# File 'lib/oflow/actor.rb', line 60

def type
  @type
end

Instance Method Details

#to_sObject Also known as: inspect



73
74
75
# File 'lib/oflow/actor.rb', line 73

def to_s()
  "Spec{op: #{@op}, type: #{@type}}"
end