--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Formats the bytes in <tt>size</tt> into a more understandable representation (e.g., giving it 1500 yields 1.5 KB). This method is useful for reporting file sizes to users. This method returns nil if <tt>size</tt> cannot be converted into a number. You can customize the format in the <tt>options</tt> hash.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Options
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:precision</tt> - Sets the level of precision (defaults to 1).
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:separator</tt> - Sets the separator between the units (defaults to &quot;.&quot;).
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to &quot;&quot;).
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: " number_to_human_size(123)                                          # =&gt; 123 Bytes\n number_to_human_size(1234)                                         # =&gt; 1.2 KB\n number_to_human_size(12345)                                        # =&gt; 12.1 KB\n number_to_human_size(1234567)                                      # =&gt; 1.2 MB\n number_to_human_size(1234567890)                                   # =&gt; 1.1 GB\n number_to_human_size(1234567890123)                                # =&gt; 1.1 TB\n number_to_human_size(1234567, :precision =&gt; 2)                     # =&gt; 1.18 MB\n number_to_human_size(483989, :precision =&gt; 0)                      # =&gt; 473 KB\n number_to_human_size(1234567, :precision =&gt; 2, :separator =&gt; ',')  # =&gt; 1,18 MB\n"
- !ruby/struct:SM::Flow::P 
  body: "You can still use <tt>number_to_human_size</tt> with the old API that accepts the <tt>precision</tt> as its optional second parameter:"
- !ruby/struct:SM::Flow::VERB 
  body: " number_to_human_size(1234567, 2)    # =&gt; 1.18 MB\n number_to_human_size(483989, 0)     # =&gt; 473 KB\n"
full_name: ActionView::Helpers::NumberHelper#number_to_human_size
is_singleton: false
name: number_to_human_size
params: (number, *args)
visibility: public
