lib/nrser/types/type.rb
# A verbose breakdown of the implementation internals of the type.
# 
# Realizing classes *SHOULD* override this method with a precise 
# implementation.
# 
# The {Type#explain} implementation dumps all instance variables that 
# appear to have accessor methods and whose names to not start with `_`.
# 
# Check out the {file:lib/nrser/types/doc/display_table.md display table}
# for examples.
# 
# @return [String]
# 
A verbose breakdown of the implementation internals of the type.
Realizing classes *SHOULD* override this method with a precise
implementation.

The {Type#explain} implementation dumps all instance variables that
appear to have accessor methods and whose names to not start with `_`.

Check out the {file:lib/nrser/types/doc/display_table.md display table}
for examples.
A verbose breakdown of the implementation internals of the type . Realizing classes * SHOULD * override this method with a precise implementation . The { Type#explain } implementation dumps all instance variables that appear to have accessor methods and whose names to not start with ` _ ` . Check out the { file : lib / nrser / types / doc / display_table . md display table } for examples .
def explain
    @_explain ||= begin
      s = "#{ self.class.demod_name }<"
      ivars = instance_variables.
        each_with_object( [] ) { |var_name, array|
          method_name = var_name.to_s[1..-1]
          if  method_name.start_with?( '_' ) ||
              !respond_to?( method_name )
            next
          end
          value = instance_variable_get var_name
          unless value.nil?
            array << "#{ var_name }=#{ value.inspect }"
          end
        }.join( ', ' )
      s += " #{ ivars }" unless ivars.empty?
      s += '>'
      s
    end
  end
def explain @_explain ||= begin s = "#{ self.class.demod_name }<" ivars = instance_variables . each_with_object ( [ ] ) { | var_name , array | method_name = var_name . to_s [ 1 .. - 1 ] if method_name . start_with? ( '_' ) || ! respond_to? ( method_name ) next end value = instance_variable_get var_name unless value . nil? array << "#{ var_name }=#{ value.inspect }" end } . join ( ', ' ) s += " #{ ivars }" unless ivars . empty? s += '>' s end end
A verbose breakdown of the implementation internals of the type.
A verbose breakdown of the implementation internals of the type .
# each_with_object( {} ) { |var_name, hash|
None
String