Class: Motoko::Resolvers::Cpu

Inherits:
BaseResolver show all
Defined in:
lib/motoko/resolvers/cpu.rb

Instance Attribute Summary

Attributes inherited from BaseResolver

#formatter, #human_name, #name

Instance Method Summary collapse

Methods inherited from BaseResolver

#align, #initialize, #value

Methods included from Utils::SnakeToCamel

#snake_to_camel_case

Constructor Details

This class inherits a constructor from Motoko::Resolvers::BaseResolver

Instance Method Details

#resolve_for(node) ⇒ Object



6
7
8
# File 'lib/motoko/resolvers/cpu.rb', line 6

def resolve_for(node)
  format('%<ncpu>2d × %<model>s', ncpu: node.fact('processors.count'), model: node.fact('processors.models').first.gsub(/\((R|TM)\)|Processor/, '').gsub(/ {2,}/, ' '))
end