class Jinx::HeaderParser

Defined in:

header_parser.cr

Constant Summary

AUTHOR_PATTERN = /^[\s\t#]*author: (.*)$/i
HEADER_PATTERN = /^=begin\r?\n?(.+?)^=end/m
TAGS_PATTERN = /^[\s\t#]*tags: (.*?)$/i
VERSION_PATTERN = /^[\s\t#]*version: (.*)$/i

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(build : Build, file : String, source : String) #

[View source]

Class Method Detail

def self.parse_author(header : Nil) #

[View source]
def self.parse_author(header : String) #

[View source]
def self.parse_headers(source) #

[View source]
def self.parse_tags(header : Nil) #

[View source]
def self.parse_tags(header : String) #

[View source]
def self.parse_version(header : Nil) #

[View source]
def self.parse_version(header : String) #

[View source]

Instance Method Detail

def author : String | Nil #

[View source]
def author=(author : String | Nil) #

[View source]
def file : String | Nil #

[View source]
def file=(file : String | Nil) #

[View source]
def header : String | Nil #

[View source]
def header=(header : String | Nil) #

[View source]
def tags : Array(String) #

[View source]
def tags=(tags : Array(String)) #

[View source]
def version : String | Nil #

[View source]
def version=(version : String | Nil) #

[View source]
def write(build, file) #

[View source]