class Macrocosm::Template::Position

Attributes

name[R]

Public Class Methods

new(name) click to toggle source
# File lib/macrocosm/template.rb, line 10
def initialize(name)
  @name = name
end

Public Instance Methods

default_value() click to toggle source
# File lib/macrocosm/template.rb, line 22
def default_value
  @default_value ||= Raw.match(regexp)[1]
end
mark() click to toggle source
# File lib/macrocosm/template.rb, line 18
def mark
  "<%= #{name} %>"
end
regexp() click to toggle source
# File lib/macrocosm/template.rb, line 14
def regexp
  @regexp ||= Regexp.new("\\/\\*.*?start-#{name}.*?\\*\\/(.*)\\/\\*.*?end-#{name}.*?\\*\\/", Regexp::MULTILINE)
end