From 10d3bf641393f19a88fee73773c81288d7129400 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 8 Mar 2024 02:17:15 -0300 Subject: [PATCH] Update API docs --- lib/bsd/control.rb | 7 ++++--- lib/bsd/control/feature.rb | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/bsd/control.rb b/lib/bsd/control.rb index bc3d062..f24f2a4 100644 --- a/lib/bsd/control.rb +++ b/lib/bsd/control.rb @@ -11,6 +11,7 @@ module BSD::Control ## # @return [Array] + # Returns an array of available features. def self.available_features Feature.available end @@ -19,7 +20,7 @@ module BSD::Control # @example # BSD::Control # .feature(:mprotect) - # .enable!("/usr/local/bin/firefox") + # .enable!("/usr/local/bin/emacs-29.2") # # @param [String] name # The name of a feature. @@ -28,9 +29,9 @@ module BSD::Control # When a feature is not found. # # @return [BSD::Control::Feature] - # Returns an instance of BSD::Control::Feature. + # Returns an instance of {BSD::Control::Feature BSD::Control::Feature}. def self.feature(name) - feature = Feature.available.find { _1.name == name.to_s } + feature = available_features.find { _1.name == name.to_s } feature ? feature : raise(Error, "feature '#{name}' wasn't found") end diff --git a/lib/bsd/control/feature.rb b/lib/bsd/control/feature.rb index 0d645f5..fc77c09 100644 --- a/lib/bsd/control/feature.rb +++ b/lib/bsd/control/feature.rb @@ -2,7 +2,7 @@ module BSD::Control class Feature < Struct.new(:name, :enable, :disable) ## # @return [Array] - # Returns an array of available features. + # Returns an array of available features. def self.available BSD::Control::FFI.available_features end @@ -41,7 +41,7 @@ module BSD::Control end ## - # Restore system defaults. + # Restore system defaults for a given file. # # @param [String] path # The path to a file.