Class: Peruby::Glob
- Inherits:
-
Object
- Object
- Peruby::Glob
- Defined in:
- lib/peruby/runtime/glob.rb
Overview
Five independent value slots associated with one Perl symbol name.
Constant Summary collapse
- SLOTS =
%i[scalar array hash code io].freeze
Instance Attribute Summary collapse
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
Instance Method Summary collapse
-
#initialize(full_name) ⇒ Glob
constructor
A new instance of Glob.
- #replace(slot, value) ⇒ Object
Constructor Details
Instance Attribute Details
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
8 9 10 |
# File 'lib/peruby/runtime/glob.rb', line 8 def full_name @full_name end |
Instance Method Details
#replace(slot, value) ⇒ Object
18 19 20 21 22 |
# File 'lib/peruby/runtime/glob.rb', line 18 def replace(slot, value) raise ArgumentError, "unknown glob slot: #{slot}" unless SLOTS.include?(slot) public_send("#{slot}=", value) end |