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)


17
18
19
# File 'lib/yoda/store/objects/library/std.rb', line 17

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

Instance Attribute Details

#versionString (readonly)

Returns:

  • (String)


9
10
11
# File 'lib/yoda/store/objects/library/std.rb', line 9

def version
  @version
end

Class Method Details

.current_versionCore

Returns:



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

def self.current_version
  new
end

Instance Method Details

#doc_pathObject



33
34
35
# File 'lib/yoda/store/objects/library/std.rb', line 33

def doc_path
  VersionStore.for_current_version.stdlib_yardoc_path
end

#idObject



25
26
27
# File 'lib/yoda/store/objects/library/std.rb', line 25

def id
  name
end

#nameObject



29
30
31
# File 'lib/yoda/store/objects/library/std.rb', line 29

def name
  'std'
end

#to_hObject



21
22
23
# File 'lib/yoda/store/objects/library/std.rb', line 21

def to_h
  { version: version }
end

#with_project_connection(**kwargs) ⇒ Connected

Returns:



38
39
40
# File 'lib/yoda/store/objects/library/std.rb', line 38

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