test harness is back, and pages fixed after refactor
This commit is contained in:
@ -60,7 +60,7 @@ module Merged
|
||||
end
|
||||
|
||||
def template_style
|
||||
Style.cards[ section.card_template ]
|
||||
CardStyle.cards[ section.card_template ]
|
||||
end
|
||||
def allowed_fields
|
||||
template_style.fields
|
||||
@ -68,7 +68,7 @@ module Merged
|
||||
|
||||
def self.build_data(card_template)
|
||||
data = { "id" => SecureRandom.hex(10) }
|
||||
Style.cards[ card_template ].fields.each do |key|
|
||||
CardStyle.cards[ card_template ].fields.each do |key|
|
||||
data[key] = key.upcase
|
||||
end
|
||||
data
|
||||
|
@ -1,6 +1,8 @@
|
||||
module Merged
|
||||
class Option
|
||||
|
||||
@@options = {}
|
||||
|
||||
attr_reader :name , :default , :description
|
||||
|
||||
def initialize(options)
|
||||
@ -30,6 +32,10 @@ module Merged
|
||||
@values.split(" ")
|
||||
end
|
||||
|
||||
def self.options
|
||||
@@options
|
||||
end
|
||||
|
||||
def self.load(yaml)
|
||||
yaml.each do |content|
|
||||
option = Option.new(content)
|
||||
|
@ -49,7 +49,7 @@ module Merged
|
||||
end
|
||||
|
||||
def template_style
|
||||
Style.sections[ template ]
|
||||
SectionStyle.sections[ template ]
|
||||
end
|
||||
|
||||
def allowed_fields
|
||||
|
Reference in New Issue
Block a user