Module: Etheruby::TypeMatchers

Defined in:
lib/etheruby/type_matchers.rb

Class Method Summary collapse

Class Method Details

.is_dualsized_type(param) ⇒ Object



9
10
11
# File 'lib/etheruby/type_matchers.rb', line 9

def is_dualsized_type(param)
  param.to_s.match /^([a-z]+)(\d+)x(\d+)$/
end

.is_dynamic_array_type(param) ⇒ Object



17
18
19
# File 'lib/etheruby/type_matchers.rb', line 17

def is_dynamic_array_type(param)
  param.to_s.match(/^(.+)\[\]$/)
end

.is_sized_type(param) ⇒ Object



5
6
7
# File 'lib/etheruby/type_matchers.rb', line 5

def is_sized_type(param)
  param.to_s.match /^([a-z]+)(\d+)$/
end

.is_static_array_type(param) ⇒ Object



13
14
15
# File 'lib/etheruby/type_matchers.rb', line 13

def is_static_array_type(param)
  param.to_s.match(/^(.+)\[(\d+)\]$/)
end