Class: Yoda::Store::Objects::Library::Std

Inherits:
Object
  • Object
show all
Includes:
Serializable
Defined in:
lib/yoda/store/objects/library/std.rb

Defined Under Namespace

Classes: Connected

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Serializable

#==, #derive, #eql?, #hash, included, #to_json

Constructor Details

#initialize(version: RUBY_VERSION) ⇒ Std

Returns a new instance of Std.

Parameters:

  • version (String) (defaults to: RUBY_VERSION)


19
20
21
# File 'lib/yoda/store/objects/library/std.rb', line 19

def initialize(version: RUBY_VERSION)
  @version = version
end

Instance Attribute Details

#versionString (readonly)

Returns:

  • (String)


11
12
13
# File 'lib/yoda/store/objects/library/std.rb', line 11

def version
  @version
end

Class Method Details

.current_versionCore

Returns:



14
15
16
# File 'lib/yoda/store/objects/library/std.rb', line 14

def self.current_version
  new
end

Instance Method Details

#doc_pathObject



35
36
37
# File 'lib/yoda/store/objects/library/std.rb', line 35

def doc_path
  VersionStore.for_current_version.stdlib_yardoc_path
end

#idObject



27
28
29
# File 'lib/yoda/store/objects/library/std.rb', line 27

def id
  name
end

#nameObject



31
32
33
# File 'lib/yoda/store/objects/library/std.rb', line 31

def name
  'std'
end

#to_hObject



23
24
25
# File 'lib/yoda/store/objects/library/std.rb', line 23

def to_h
  { version: version }
end

#with_project_connection(**kwargs) ⇒ Connected

Returns:



40
41
42
# File 'lib/yoda/store/objects/library/std.rb', line 40

def with_project_connection(**kwargs)
  self.class.const_get(:Connected).new(self, **kwargs)
end