Class: RbsGoose::IO::Example
- Inherits:
-
Object
- Object
- RbsGoose::IO::Example
- Defined in:
- lib/rbs_goose/io/example.rb
Instance Attribute Summary collapse
-
#refined_rbs ⇒ Object
readonly
Returns the value of attribute refined_rbs.
-
#typed_ruby ⇒ Object
readonly
Returns the value of attribute typed_ruby.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(typed_ruby:, refined_rbs:) ⇒ Example
constructor
A new instance of Example.
- #to_h ⇒ Object
Constructor Details
#initialize(typed_ruby:, refined_rbs:) ⇒ Example
Returns a new instance of Example.
15 16 17 18 |
# File 'lib/rbs_goose/io/example.rb', line 15 def initialize(typed_ruby:, refined_rbs:) @typed_ruby = typed_ruby @refined_rbs = refined_rbs end |
Instance Attribute Details
#refined_rbs ⇒ Object (readonly)
Returns the value of attribute refined_rbs.
24 25 26 |
# File 'lib/rbs_goose/io/example.rb', line 24 def refined_rbs @refined_rbs end |
#typed_ruby ⇒ Object (readonly)
Returns the value of attribute typed_ruby.
24 25 26 |
# File 'lib/rbs_goose/io/example.rb', line 24 def typed_ruby @typed_ruby end |
Class Method Details
.from_path(ruby_path:, rbs_path:, refined_rbs_dir:, base_path:) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rbs_goose/io/example.rb', line 7 def from_path(ruby_path:, rbs_path:, refined_rbs_dir:, base_path:) Example.new( typed_ruby: TypedRuby.from_path(ruby_path:, rbs_path:, base_path:), refined_rbs: File.new(path: rbs_path, base_path: ::File.join(base_path, refined_rbs_dir)) ) end |
Instance Method Details
#to_h ⇒ Object
20 21 22 |
# File 'lib/rbs_goose/io/example.rb', line 20 def to_h { typed_ruby:, refined_rbs: } end |