Class: WR::Richedit::Effects

Inherits:
Object
  • Object
show all
Defined in:
lib/wrb/components/richedit.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Effects

Returns a new instance of Effects.



625
626
627
628
629
# File 'lib/wrb/components/richedit.rb', line 625

def initialize(*args)
  args = args[0] if args[0].is_a?(Array)
  @effects = 0
  args.each{|i| @effects |= i.is_a?(Symbol) ? CFEffects[arg].to_i : i.to_i}
end

Instance Method Details

#&(arg) ⇒ Object



636
637
638
639
# File 'lib/wrb/components/richedit.rb', line 636

def &(arg)
  @effects &= arg.is_a?(Symbol) ? CFEffects[arg].to_i : arg.to_i
  self
end

#to_iObject



641
642
643
# File 'lib/wrb/components/richedit.rb', line 641

def to_i()
  @effects
end

#|(arg) ⇒ Object



631
632
633
634
# File 'lib/wrb/components/richedit.rb', line 631

def |(arg)
  @effects |= arg.is_a?(Symbol) ? CFEffects[arg].to_i : arg.to_i
  self
end