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.