Class: JsonRander::JNumPositiveDigit

Inherits:
JNumNode
  • Object
show all
Defined in:
lib/json_rander/json_num_builder.rb

Overview

1~9

Constant Summary collapse

@@nums =
(1..9).to_a

Instance Method Summary collapse

Methods inherited from JNumNode

#initialize, #is_head?, #is_tail?, #random_next

Constructor Details

This class inherits a constructor from JsonRander::JNumNode

Instance Method Details

#to_sObject



75
76
77
# File 'lib/json_rander/json_num_builder.rb', line 75

def to_s
  return "#{@@nums.sample}"
end