Class: CodelessCode::LanguageSet

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/codeless_code/language_set.rb

Overview

An collection of fable sets in a given language, but possibly translated by the different people.

Constant Summary collapse

NotFoundError =

If the requested language set doesn't exist

Class.new(StandardError)
LANG_PATTERN =
'%s-*'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lang, root_dir:) ⇒ LanguageSet

Returns a new instance of LanguageSet


35
36
37
38
# File 'lib/codeless_code/language_set.rb', line 35

def initialize(lang, root_dir:)
  @lang = lang
  @root_dir = root_dir
end

Instance Attribute Details

#langObject (readonly)

Returns the value of attribute lang


32
33
34
# File 'lib/codeless_code/language_set.rb', line 32

def lang
  @lang
end

#root_dirObject (readonly)

Returns the value of attribute root_dir


32
33
34
# File 'lib/codeless_code/language_set.rb', line 32

def root_dir
  @root_dir
end

Instance Method Details

#fable_setsObject


40
41
42
# File 'lib/codeless_code/language_set.rb', line 40

def fable_sets
  dirs.map { |dir| FableSet.new(dir) }
end