Module: KissShot::ObjC::Macro
Instance Method Summary collapse
-
#objc_block_comment ⇒ Object
Add /**/ comment.
-
#objc_comment(input) ⇒ Object
Add // comment.
-
#objc_import(input) ⇒ Object
For ‘#import ???`.
-
#objc_import_d(input) ⇒ Object
For ‘#import <???>`, d is for diamond.
-
#objc_import_q(input) ⇒ Object
For ‘#import “???”`, q is for quotes.
Methods included from Base
#_objc_bracket_array, #_objc_diamond_array
Instance Method Details
#objc_block_comment ⇒ Object
Add /**/ comment
15 16 17 18 19 20 21 |
# File 'lib/kiss_shot/objc/macro.rb', line 15 def objc_block_comment line "/*" push_line_prefix " * " yield if block_given? pop_line_prefix " * " line " */" end |
#objc_comment(input) ⇒ Object
Add // comment
9 10 11 |
# File 'lib/kiss_shot/objc/macro.rb', line 9 def objc_comment(input) line "// #{input}" end |
#objc_import(input) ⇒ Object
For ‘#import ???`
40 41 42 |
# File 'lib/kiss_shot/objc/macro.rb', line 40 def objc_import(input) line "#import #{input}" end |
#objc_import_d(input) ⇒ Object
For ‘#import <???>`, d is for diamond
26 27 28 |
# File 'lib/kiss_shot/objc/macro.rb', line 26 def objc_import_d(input) objc_import "<#{input}>" end |
#objc_import_q(input) ⇒ Object
For ‘#import “???”`, q is for quotes
33 34 35 |
# File 'lib/kiss_shot/objc/macro.rb', line 33 def objc_import_q(input) objc_import "\"#{input}\"" end |