Class: Flammarion::Writeable::DeferredValue

Inherits:
Delegator
  • Object
show all
Defined in:
lib/flammarion/writeable.rb

Overview

A way to retrieve the current value of a user interacterive component.

Instance Method Summary collapse

Constructor Details

#initializeDeferredValue

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DeferredValue.



14
15
16
# File 'lib/flammarion/writeable.rb', line 14

def initialize
  super @value
end

Instance Method Details

#__getobj__Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



29
30
31
# File 'lib/flammarion/writeable.rb', line 29

def __getobj__
  @value
end

#__setobj__(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19
20
21
# File 'lib/flammarion/writeable.rb', line 19

def __setobj__(value)
  @value = value
end

#checked?Boolean

Returns true if the component is checked and false if it is not. Undefined if the component is not a checkbox.

Returns:

  • (Boolean)

    true if the component is checked and false if it is not. Undefined if the component is not a checkbox.



40
41
42
# File 'lib/flammarion/writeable.rb', line 40

def checked?
  return @value
end

#inspectString

Returns a string representing the remote component’s value.

Returns:

  • (String)

    a string representing the remote component’s value



34
35
36
# File 'lib/flammarion/writeable.rb', line 34

def inspect
  "#R#{@value.inspect}"
end

#valueObject

Returns the current value of the remote component.

Returns:

  • (Object)

    the current value of the remote component



24
25
26
# File 'lib/flammarion/writeable.rb', line 24

def value
  @value
end