Class: Parlour::Types::Raw

Inherits:
Type
  • Object
show all
Defined in:
lib/parlour/types.rb

Overview

A basic type as a raw string.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#hash, #to_type, to_type

Constructor Details

#initialize(str) ⇒ Raw

Returns a new instance of Raw.



47
48
49
# File 'lib/parlour/types.rb', line 47

def initialize(str)
  @str = str
end

Instance Attribute Details

#strObject (readonly)

Returns the value of attribute str.



52
53
54
# File 'lib/parlour/types.rb', line 52

def str
  @str
end

Instance Method Details

#==(other) ⇒ Object



55
56
57
# File 'lib/parlour/types.rb', line 55

def ==(other)
  Raw === other && str == other.str
end

#describeObject



70
71
72
# File 'lib/parlour/types.rb', line 70

def describe
  str
end

#generate_rbiObject



60
61
62
# File 'lib/parlour/types.rb', line 60

def generate_rbi
  str
end

#generate_rbsObject



65
66
67
# File 'lib/parlour/types.rb', line 65

def generate_rbs
  str
end