Class: KatakataIrb::Types::SingletonType
- Inherits:
-
Object
- Object
- KatakataIrb::Types::SingletonType
- Defined in:
- lib/katakata_irb/types.rb
Instance Attribute Summary collapse
-
#module_or_class ⇒ Object
readonly
Returns the value of attribute module_or_class.
Instance Method Summary collapse
- #all_methods ⇒ Object
- #constants ⇒ Object
-
#initialize(module_or_class) ⇒ SingletonType
constructor
A new instance of SingletonType.
- #inspect ⇒ Object
- #methods ⇒ Object
- #nillable? ⇒ Boolean
- #nonnillable ⇒ Object
- #transform {|_self| ... } ⇒ Object
- #types ⇒ Object
Constructor Details
#initialize(module_or_class) ⇒ SingletonType
Returns a new instance of SingletonType.
175 176 177 |
# File 'lib/katakata_irb/types.rb', line 175 def initialize(module_or_class) @module_or_class = module_or_class end |
Instance Attribute Details
#module_or_class ⇒ Object (readonly)
Returns the value of attribute module_or_class.
174 175 176 |
# File 'lib/katakata_irb/types.rb', line 174 def module_or_class @module_or_class end |
Instance Method Details
#all_methods ⇒ Object
180 |
# File 'lib/katakata_irb/types.rb', line 180 def all_methods() = methods | Kernel.methods |
#constants ⇒ Object
181 |
# File 'lib/katakata_irb/types.rb', line 181 def constants() = @module_or_class.constants |
#inspect ⇒ Object
185 186 187 |
# File 'lib/katakata_irb/types.rb', line 185 def inspect "#{module_or_class}.itself" end |
#methods ⇒ Object
179 |
# File 'lib/katakata_irb/types.rb', line 179 def methods() = @module_or_class.methods |
#nillable? ⇒ Boolean
183 |
# File 'lib/katakata_irb/types.rb', line 183 def nillable?() = false |
#nonnillable ⇒ Object
184 |
# File 'lib/katakata_irb/types.rb', line 184 def nonnillable() = self |
#transform {|_self| ... } ⇒ Object
178 |
# File 'lib/katakata_irb/types.rb', line 178 def transform() = yield(self) |
#types ⇒ Object
182 |
# File 'lib/katakata_irb/types.rb', line 182 def types() = [self] |