Sha256: 59e6ddc1201ac1fa2808aa20299d10aecaea7971a7eeee093fb2dfa061e58a6b

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

# Integer

`factorial`
------
Calculates the factorial of an integer.

```ruby
4.factorial #=> 24
```

`factors`
------
Calculates all the factors of an integer.

```ruby
24.factors #=> [1, 24, 2, 12, 3, 8, 4, 6]
```

`of`
------
Like `times` but returns a collection of the yield results.

```ruby
3.of { |i| i + 1 } #=> ['1', '2', '3']
```

`roman_numeral`
------
Converts an integer to a roman_numeral numeral.

```ruby
0.roman_numeral   #=> ''
49.roman_numeral  #=> 'XLIX'
-49.roman_numeral #=> '-XLIX'
```

`to_time` aka `to_t`
------
Returns a Time object for the given Integer.

```ruby
3.to_time #=> '1969-12-31 19:00:03.000000000 -0500'
```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lite-ruby-1.0.1 docs/INTEGER.md
lite-ruby-1.0.0 docs/INTEGER.md