Class: TerminalCal::CalendarParserFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/terminal_cal/calendar_parser_factory.rb

Constant Summary collapse

DEFAULT_PARSER =
TerminalCal::CalendarParsers::IcsParserWrapper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parser) ⇒ CalendarParserFactory

Returns a new instance of CalendarParserFactory.



7
8
9
# File 'lib/terminal_cal/calendar_parser_factory.rb', line 7

def initialize(parser)
  @parser = parser || DEFAULT_PARSER
end

Instance Attribute Details

#parserObject (readonly)

Returns the value of attribute parser.



5
6
7
# File 'lib/terminal_cal/calendar_parser_factory.rb', line 5

def parser
  @parser
end