Module: BOAST::Inspectable
- Included in:
- Affectation, CKernel, CodeBlock, Comment, ConstArray, ControlStructure, Dimension, Expression, FMA, FMS, FuncCall, HighLevelOperator, Load, MaskLoad, MaskStore, Modulo, Pragma, Procedure, Set, Slice::SliceItem, Store, Ternary, Variable
- Defined in:
- lib/BOAST/Language/Inspectable.rb
Instance Method Summary collapse
Instance Method Details
#inspect ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/BOAST/Language/Inspectable.rb', line 5 def inspect if BOAST::boast_inspect? then variables = instance_variables.map{ |v| instance_variable_get(v) ? "#{v}=#{instance_variable_get(v).inspect}" : nil }.reject{ |v| v.nil? }.join(", ") "#<#{self.class}:0x#{(self.object_id<<1).to_s(16)}#{variables == "" ? "" : " #{variables}" }>" else to_s end end |