Sha256: 97b50c0d927ccf824482f3e99aa43e69785d5c792b420faad3051983e64197b6

Contents?: true

Size: 430 Bytes

Versions: 9

Compression:

Stored size: 430 Bytes

Contents

# to_key method returns a suitable unique id that can be used as
# a react `key`.  Other classes may override to_key as needed
# for example hyper_mesh returns the object id of the internal
# backing record.
#
# to_key is automatically called on objects passed as keys for
# example Foo(key: my_object) results in Foo(key: my_object.to_key)

# for Boolean to_key can be true or false
class Boolean
  def to_key
    self
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyper-component-1.0.alpha1.8 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1.7 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1.6 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1.5 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1.4 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1.3 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1.2 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1.1 lib/hyperstack/ext/component/boolean.rb
hyper-component-1.0.alpha1 lib/hyperstack/ext/component/boolean.rb