Class: MdPage::OptParser

Inherits:
OptionParser
  • Object
show all
Defined in:
lib/mdpage/optparser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptParser

Returns a new instance of OptParser.



8
9
10
11
12
13
14
15
16
17
# File 'lib/mdpage/optparser.rb', line 8

def initialize
  @template_name
  @help = <<-HELP
  Usage:
-h, --help            : show this messages
-t, --template <name> : use custom template <name>.html.erb under ~/.mdpage/
-v, --version         : show version infomation
  HELP
  super
end

Instance Attribute Details

#helpObject (readonly)

Returns the value of attribute help.



5
6
7
# File 'lib/mdpage/optparser.rb', line 5

def help
  @help
end

#template_nameObject

Returns the value of attribute template_name.



6
7
8
# File 'lib/mdpage/optparser.rb', line 6

def template_name
  @template_name
end