Module: BranchIOCLI::Format
- Included in:
- HighlineFormat, MarkdownFormat, ShellFormat
- Defined in:
- lib/branch_io_cli/format.rb,
lib/branch_io_cli/format/shell_format.rb,
lib/branch_io_cli/format/highline_format.rb,
lib/branch_io_cli/format/markdown_format.rb
Defined Under Namespace
Modules: HighlineFormat, MarkdownFormat, ShellFormat
Instance Method Summary
collapse
Instance Method Details
#option(opt) ⇒ Object
12
13
14
|
# File 'lib/branch_io_cli/format.rb', line 12
def option(opt)
highlight "--#{opt.to_s.gsub(/_/, '-')}"
end
|
#render(template) ⇒ Object
7
8
9
10
|
# File 'lib/branch_io_cli/format.rb', line 7
def render(template)
path = File.expand_path(File.join("..", "..", "assets", "templates", "#{template}.erb"), __FILE__)
ERB.new(File.read(path)).result binding
end
|