Sha256: d2b35861516d28fb6495ac0f76d00af170aae8244f887e4491c110678e3cbf1e
Contents?: true
Size: 1.08 KB
Versions: 25
Compression:
Stored size: 1.08 KB
Contents
# frozen_string_literal: true module TailwindDsl module Etl module RawComponents # Source File # # SourceFile represents a list of source files that contain raw Tailwind CSS components class SourceFile < TailwindDsl::Etl::Element attr_accessor :name attr_accessor :file_name attr_accessor :file_name_only attr_accessor :file attr_accessor :target def initialize(**args) @name = grab_arg(args, :name, guard: 'Missing name') @file_name = grab_arg(args, :file_name, guard: 'Missing file_name') @file_name_only = grab_arg(args, :file_name_only, guard: 'Missing file_name_only') @file = grab_arg(args, :file, guard: 'Missing file') @target = map_to(TargetFile, grab_arg(args, :target)) end def to_h result = { name: name, file_name: file_name, file_name_only: file_name_only, file: file } result[:target] = target.to_h if target result end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems