Method: Translate::Translation#initialize

Defined in:
lib/translate.rb

#initialize(expression, options = {}) ⇒ Translation

Ensure width will be an integer, and provides an empty array of items.



69
70
71
72
73
74
75
76
77
# File 'lib/translate.rb', line 69

def initialize(expression, options = {})
  self.expression = expression
  options = OPTIONS.merge(options)
  for k in options.keys
    self.send("#{k}=", options[k]) if self.respond_to?(k)
  end
  @items = []
  @width = @width.to_i
end