class ProconBypassMan::Web::SettingParser

Public Class Methods

new(text) click to toggle source
# File lib/procon_bypass_man/web/setting_parser.rb, line 184
def initialize(text)
  @parser = Core.new
  @parser.instance_eval(text)
end
parse(text) click to toggle source
# File lib/procon_bypass_man/web/setting_parser.rb, line 166
def self.parse(text)
  new(text)
end
parse_file(path) click to toggle source
# File lib/procon_bypass_man/web/setting_parser.rb, line 170
def self.parse_file(path)
  new(
    YAML.load_file(path)&.dig("setting")
  )
end

Public Instance Methods

to_hash() click to toggle source
# File lib/procon_bypass_man/web/setting_parser.rb, line 176
def to_hash
  @parser.to_hash
end
to_hash_group_by_button() click to toggle source
# File lib/procon_bypass_man/web/setting_parser.rb, line 180
def to_hash_group_by_button
  @parser.to_hash_group_by_button
end