Sha256: 88699526a1bf275e77d68b176f2e5f111e36fd3a5ebc2521af064eadfb4d1441
Contents?: true
Size: 918 Bytes
Versions: 36
Compression:
Stored size: 918 Bytes
Contents
module Avo module Fields class CodeField < BaseField attr_reader :height attr_reader :language attr_reader :theme attr_reader :tab_size attr_reader :indent_with_tabs attr_reader :line_wrapping def initialize(name, **args, &block) @defaults = { partial_name: "code-field" } hide_on :index super(name, **args, &block) @language = args[:language].present? ? args[:language].to_s : "javascript" @theme = args[:theme].present? ? args[:theme].to_s : "material-darker" @height = args[:height].present? ? args[:height].to_s : "auto" @tab_size = args[:tab_size].present? ? args[:tab_size] : 2 @indent_with_tabs = args[:indent_with_tabs].present? ? args[:indent_with_tabs] : false @line_wrapping = args[:line_wrapping].present? ? args[:line_wrapping] : true end end end end
Version data entries
36 entries across 36 versions & 1 rubygems