Class: Homebrew::InstallSteps::DSL Private
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Instance Attribute Summary collapse
- #steps ⇒ Steps readonly private
Class Method Summary collapse
- .build(default_base: nil, default_source_base: nil, default_target_base: nil, &block) ⇒ Steps private
- .normalise_steps(steps) ⇒ Steps private
Instance Method Summary collapse
- #compile_gsettings_schemas ⇒ void private
- #gdk_pixbuf_query_loaders ⇒ void private
- #gio_querymodules ⇒ void private
- #gtk_update_icon_cache ⇒ void private
- #initialize(default_base: nil, default_source_base: nil, default_target_base: nil) ⇒ void constructor private
- #ln_s(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, force: false, uninstall: false) ⇒ void private
- #ln_sf(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, uninstall: false) ⇒ void private
- #mkdir(path, base: nil) ⇒ void private
- #mkdir_p(path, base: nil) ⇒ void private
- #move(source, target, source_base: nil, target_base: nil, force: false) ⇒ void (also: #mv) private
- #move_children(source, target, source_base: nil, target_base: nil) ⇒ void private
- #symlink(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, force: false, uninstall: false) ⇒ void private
- #touch(path, base: nil) ⇒ void private
- #update_desktop_database ⇒ void private
- #update_mime_database ⇒ void private
Constructor Details
#initialize(default_base: nil, default_source_base: nil, default_target_base: nil) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
22 23 24 25 26 27 |
# File 'install_steps.rb', line 22 def initialize(default_base: nil, default_source_base: nil, default_target_base: nil) @default_base = ::T.let(default_base, ::T.nilable(::T.any(::String, ::Symbol))) @default_source_base = ::T.let(default_source_base, ::T.nilable(::T.any(::String, ::Symbol))) @default_target_base = ::T.let(default_target_base, ::T.nilable(::T.any(::String, ::Symbol))) @steps = ::T.let([], Steps) end |
Instance Attribute Details
#steps ⇒ Steps (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
30 31 32 |
# File 'install_steps.rb', line 30 def steps @steps end |
Class Method Details
.build(default_base: nil, default_source_base: nil, default_target_base: nil, &block) ⇒ Steps
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
40 41 42 43 44 |
# File 'install_steps.rb', line 40 def self.build(default_base: nil, default_source_base: nil, default_target_base: nil, &block) dsl = new(default_base:, default_source_base:, default_target_base:) dsl.instance_eval(&block) if block dsl.steps end |
.normalise_steps(steps) ⇒ Steps
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
47 48 49 50 51 |
# File 'install_steps.rb', line 47 def self.normalise_steps(steps) steps.map do |step| ::T.cast(normalise_step_value(step), Step) end end |
Instance Method Details
#compile_gsettings_schemas ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
172 173 174 |
# File 'install_steps.rb', line 172 def compile_gsettings_schemas add_rebuild_action("compile_gsettings_schemas", "share/glib-2.0/schemas") end |
#gdk_pixbuf_query_loaders ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
182 183 184 |
# File 'install_steps.rb', line 182 def gdk_pixbuf_query_loaders add_step("gdk_pixbuf_query_loaders") end |
#gio_querymodules ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
177 178 179 |
# File 'install_steps.rb', line 177 def gio_querymodules add_rebuild_action("gio_querymodules", "lib/gio/modules") end |
#gtk_update_icon_cache ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
187 188 189 |
# File 'install_steps.rb', line 187 def gtk_update_icon_cache add_rebuild_action("gtk_update_icon_cache", "share/icons/hicolor") end |
#ln_s(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, force: false, uninstall: false) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
150 151 152 153 |
# File 'install_steps.rb', line 150 def ln_s(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, force: false, uninstall: false) symlink(source, target, source_base:, target_base:, source_formula:, target_formula:, force:, uninstall:) end |
#ln_sf(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, uninstall: false) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
166 167 168 169 |
# File 'install_steps.rb', line 166 def ln_sf(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, uninstall: false) symlink(source, target, source_base:, target_base:, source_formula:, target_formula:, force: true, uninstall:) end |
#mkdir(path, base: nil) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
69 70 71 |
# File 'install_steps.rb', line 69 def mkdir(path, base: nil) add_step("mkdir", "path" => path_spec(path, base:, default_base: @default_base)) end |
#mkdir_p(path, base: nil) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
74 75 76 |
# File 'install_steps.rb', line 74 def mkdir_p(path, base: nil) add_step("mkdir_p", "path" => path_spec(path, base:, default_base: @default_base)) end |
#move(source, target, source_base: nil, target_base: nil, force: false) ⇒ void Also known as: mv
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
92 93 94 95 96 97 |
# File 'install_steps.rb', line 92 def move(source, target, source_base: nil, target_base: nil, force: false) add_step("move", "source" => path_spec(source, base: source_base, default_base: @default_source_base), "target" => path_spec(target, base: target_base, default_base: @default_target_base), "force" => force) end |
#move_children(source, target, source_base: nil, target_base: nil) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
109 110 111 112 113 |
# File 'install_steps.rb', line 109 def move_children(source, target, source_base: nil, target_base: nil) add_step("move_children", "source" => path_spec(source, base: source_base, default_base: @default_source_base), "target" => path_spec(target, base: target_base, default_base: @default_target_base)) end |
#symlink(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, force: false, uninstall: false) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
127 128 129 130 131 132 133 134 135 136 |
# File 'install_steps.rb', line 127 def symlink(source, target, source_base: nil, target_base: nil, source_formula: nil, target_formula: nil, force: false, uninstall: false) add_step("symlink", "source" => path_spec(source, base: source_base, formula: source_formula, default_base: @default_source_base), "target" => path_spec(target, base: target_base, formula: target_formula, default_base: @default_target_base), "force" => force, "uninstall" => uninstall) end |
#touch(path, base: nil) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
79 80 81 |
# File 'install_steps.rb', line 79 def touch(path, base: nil) add_step("touch", "path" => path_spec(path, base:, default_base: @default_base)) end |
#update_desktop_database ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
197 198 199 |
# File 'install_steps.rb', line 197 def update_desktop_database add_rebuild_action("update_desktop_database", "share/applications") end |
#update_mime_database ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
192 193 194 |
# File 'install_steps.rb', line 192 def update_mime_database add_rebuild_action("update_mime_database", "share/mime") end |