futuroscope 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44424db4bac133c4e8e4009403b02d0ecc750956
4
- data.tar.gz: e38c304ced43c047b82c4f9c24d414fb8c5813d3
3
+ metadata.gz: 3f498b34f03cddab4ebf539fdd57083bb1d91a10
4
+ data.tar.gz: 7b0ce96ef70f87813fed0ff2d39384a04be5b01c
5
5
  SHA512:
6
- metadata.gz: 370dd490ff6939491f44c5860caa2c48be493650c3e2ec56d6fed74194da915e20b36e53d8025141ba695e005b102328047c1e259b72c9bd5912ffc6e8b6f98a
7
- data.tar.gz: 3e4e2723daaa6c0e088fc71da56149472ced8d4b08220e7ec3acf3bfa2e8e4c870ef32bd1eae6b9a42e7476991cf6fb0156bf1ef8871bef66b6fabeadc9a31a9
6
+ metadata.gz: 886540396354bfd6f74a730e17a8fb60e9bd59d709bd4b4c8205f13334856a647a6033c42ce9d4eaed003b442c97d9d7e0b457f50f3f2f70f5a9bf5e4dc0e096
7
+ data.tar.gz: 2c098214076c334a5979348b5b2ad2b077579c181945f23a81b19f253a7779777182d6027ee1edfec5d8d5adfdcc1ea9f7f6cb564a4e99f1b6b1f970df6ba30b
data/README.md CHANGED
@@ -56,6 +56,17 @@ puts x + y + z
56
56
  => 6
57
57
  ```
58
58
 
59
+ Since a `future` is actually delegating everything to the future's value, there
60
+ might be some cases where you want to get the actual future's value. You can do
61
+ it just by calling the `future_value` method on the future:
62
+
63
+ ```Ruby
64
+ string = "Ed Balls"
65
+ x = future{ string }
66
+ x.future_value === string
67
+ # => true
68
+ ```
69
+
59
70
  ### Future map
60
71
  ```Ruby
61
72
  require 'futuroscope'
@@ -14,7 +14,7 @@ module Futuroscope
14
14
  #
15
15
  # future = Futuroscope::Future.new { sleep(1); :edballs }
16
16
  # sleep(1)
17
- # future.value
17
+ # puts future
18
18
  # => :edballs
19
19
  # # This will return in 1 second and not 2 if the execution wasn't
20
20
  # # deferred to a thread.
@@ -43,7 +43,9 @@ module Futuroscope
43
43
  @future_value
44
44
  end
45
45
 
46
- def_delegators :future_value, :to_s, :==, :kind_of?, :is_a?, :clone, :class
46
+ def_delegators :future_value,
47
+ :to_s, :==, :kind_of?, :is_a?, :clone, :class, :inspect, :tap, :to_enum,
48
+ :display, :eql?, :hash, :methods, :nil?
47
49
 
48
50
  private
49
51
 
@@ -1,3 +1,3 @@
1
1
  module Futuroscope
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futuroscope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy