Class: Squib::Args::SprueFile Private

Inherits:
Object
  • Object
show all
Includes:
ArgLoader
Defined in:
lib/squib/args/sprue_file.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ArgLoader

#[], #convert_units, #defaultify, #expand_and_set_and_defaultify, #expandable_singleton?, #load!, #prep_layout_args, #validate

Constructor Details

#initialize(dsl_method_default = {}) ⇒ SprueFile

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SprueFile



9
10
11
# File 'lib/squib/args/sprue_file.rb', line 9

def initialize(dsl_method_default = {})
  @dsl_method_default = dsl_method_default
end

Class Method Details

.expanding_parametersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19
20
21
# File 'lib/squib/args/sprue_file.rb', line 19

def self.expanding_parameters
  []
end

.parametersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
16
17
# File 'lib/squib/args/sprue_file.rb', line 13

def self.parameters
  {
    sprue: nil
  }
end

.params_with_unitsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
# File 'lib/squib/args/sprue_file.rb', line 23

def self.params_with_units
  [] # none of them
end

Instance Method Details

#validate_template_file(arg) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
30
31
32
33
34
35
# File 'lib/squib/args/sprue_file.rb', line 27

def validate_template_file(arg)
  return nil if arg.nil?

  thefile = File.exist?(arg) ? arg : builtin(arg)
  raise "File #{File.expand_path(arg)} does not exist!" unless
    File.exist? thefile

  File.expand_path(thefile)
end