Class: Iterm2mintty::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/iterm2mintty/converter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(to: MinttyTheme.new, from: Iterm2Theme.new) ⇒ Converter

Returns a new instance of Converter.



8
9
10
11
# File 'lib/iterm2mintty/converter.rb', line 8

def initialize(to: MinttyTheme.new, from: Iterm2Theme.new)
  @to   = to
  @from = from
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



6
7
8
# File 'lib/iterm2mintty/converter.rb', line 6

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



6
7
8
# File 'lib/iterm2mintty/converter.rb', line 6

def to
  @to
end

Instance Method Details

#call(source) ⇒ Object



13
14
15
16
# File 'lib/iterm2mintty/converter.rb', line 13

def call(source)
  to.components = from.from_source(source).components
  to.output
end