Module: OKF
- Defined in:
- lib/okf.rb,
lib/okf/cli.rb,
lib/okf/path.rb,
lib/okf/skill.rb,
lib/okf/bundle.rb,
lib/okf/concept.rb,
lib/okf/version.rb,
lib/okf/server/app.rb,
lib/okf/bundle/graph.rb,
lib/okf/concept/file.rb,
lib/okf/server/graph.rb,
lib/okf/bundle/folder.rb,
lib/okf/bundle/linter.rb,
lib/okf/bundle/reader.rb,
lib/okf/bundle/writer.rb,
lib/okf/server/runner.rb,
lib/okf/markdown/links.rb,
lib/okf/bundle/validator.rb,
lib/okf/markdown/citations.rb,
lib/okf/bundle/linter/report.rb,
lib/okf/markdown/frontmatter.rb,
lib/okf/bundle/validator/result.rb
Defined Under Namespace
Modules: Markdown, Path, Server Classes: Bundle, CLI, Concept, Error, Skill
Constant Summary collapse
- VERSION =
"1.4.0"
Class Method Summary collapse
-
.blank?(value) ⇒ Boolean
Blank in the frontmatter sense: nil, false, an empty/whitespace-only string, or an empty collection.
Class Method Details
.blank?(value) ⇒ Boolean
Blank in the frontmatter sense: nil, false, an empty/whitespace-only string, or an empty collection. Numbers and other scalars are never blank. The one domain-wide predicate behind "non-empty type" (ยง9.2) and the recommended-field warnings, kept here so the gem needs no ActiveSupport.
21 22 23 24 25 26 |
# File 'lib/okf.rb', line 21 def self.blank?(value) return true if value.nil? || value == false return value.strip.empty? if value.is_a?(String) value.respond_to?(:empty?) ? value.empty? : false end |