Class: IB::OCInterface::Action

Inherits:
Struct
  • Object
show all
Defined in:
lib/ib/oc_interface.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argObject

Returns the value of attribute arg

Returns:

  • (Object)

    the current value of arg



14
15
16
# File 'lib/ib/oc_interface.rb', line 14

def arg
  @arg
end

#return_typeObject

Returns the value of attribute return_type

Returns:

  • (Object)

    the current value of return_type



14
15
16
# File 'lib/ib/oc_interface.rb', line 14

def return_type
  @return_type
end

#variableObject

Returns the value of attribute variable

Returns:

  • (Object)

    the current value of variable



14
15
16
# File 'lib/ib/oc_interface.rb', line 14

def variable
  @variable
end

Instance Method Details

#to_declareObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ib/oc_interface.rb', line 15

def to_declare
  if arg
    if arg =~ /story_?board/i
      "#{variable}:(UIStoryboard *) #{arg}"
    else
      "#{variable}:(#{return_type ? "#{return_type}*" : 'id'}) #{arg}"
    end
  else
    "#{variable}"
  end
end