Class: Rabbit::Command::RabbitSlide::TextMapper
- Inherits:
-
Object
- Object
- Rabbit::Command::RabbitSlide::TextMapper
show all
- Defined in:
- lib/rabbit/command/rabbit-slide.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of TextMapper.
305
306
307
|
# File 'lib/rabbit/command/rabbit-slide.rb', line 305
def initialize(data)
@data = data
end
|
Instance Method Details
#apply(entry) ⇒ Object
322
323
324
|
# File 'lib/rabbit/command/rabbit-slide.rb', line 322
def apply(entry)
apply_value(entry.text)
end
|
#attach(entry) ⇒ Object
309
310
311
312
313
314
315
316
317
318
319
320
|
# File 'lib/rabbit/command/rabbit-slide.rb', line 309
def attach(entry)
entry.signal_connect(:notify) do |_widget, param_spec|
if param_spec.name == "text"
if valid?(_widget.text)
_widget.style_context.remove_class(Gtk::STYLE_CLASS_ERROR)
else
_widget.style_context.add_class(Gtk::STYLE_CLASS_ERROR)
end
end
end
entry.text = value if value
end
|