Class: Taoism::Runtime::Instance

Inherits:
Struct
  • Object
show all
Defined in:
lib/taoism/runtime.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fieldsObject

Returns the value of attribute fields

Returns:

  • (Object)

    the current value of fields



27
28
29
# File 'lib/taoism/runtime.rb', line 27

def fields
  @fields
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



27
28
29
# File 'lib/taoism/runtime.rb', line 27

def type
  @type
end

Instance Method Details

#to_sObject



28
29
30
31
# File 'lib/taoism/runtime.rb', line 28

def to_s
  fields_kv = fields.map { |k, v| "#{k}=#{Runtime.repr(v)}" }
  "#{type}(#{fields_kv.join(', ')})"
end