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.



12
13
14
# File 'lib/flammarion/writeable.rb', line 12

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.



27
28
29
# File 'lib/flammarion/writeable.rb', line 27

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.



17
18
19
# File 'lib/flammarion/writeable.rb', line 17

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.



38
39
40
# File 'lib/flammarion/writeable.rb', line 38

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



32
33
34
# File 'lib/flammarion/writeable.rb', line 32

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

#valueObject

Returns the current value of the remote component.

Returns:

  • (Object)

    the current value of the remote component



22
23
24
# File 'lib/flammarion/writeable.rb', line 22

def value
  @value
end