class Rabbit::Command::RabbitSlide::TextMapper

Public Class Methods

new(data) click to toggle source
# File lib/rabbit/command/rabbit-slide.rb, line 323
def initialize(data)
  @data = data
end

Public Instance Methods

apply(entry) click to toggle source
# File lib/rabbit/command/rabbit-slide.rb, line 340
def apply(entry)
  apply_value(entry.text)
end
attach(entry) click to toggle source
# File lib/rabbit/command/rabbit-slide.rb, line 327
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