Class: Jaspion::Miya::Objectivec
- Defined in:
- lib/jaspion/miya/objectivec.rb,
lib/jaspion/miya/objectivec/uiview.rb,
lib/jaspion/miya/objectivec/uilabel.rb,
lib/jaspion/miya/objectivec/uitableview.rb,
lib/jaspion/miya/objectivec/uicollectionview.rb,
lib/jaspion/miya/objectivec/uiviewcontroller.rb
Overview
Represents an Objective-C Object class
Direct Known Subclasses
UICollectionView, UILabel, UITableView, UIView, UIViewController
Defined Under Namespace
Classes: UICollectionView, UILabel, UITableView, UIView, UIViewController
Instance Attribute Summary collapse
-
#xib_reference ⇒ Object
(also: #xib_reference?)
Returns the value of attribute xib_reference.
Attributes inherited from Object
Instance Method Summary collapse
-
#initialize(name = nil) ⇒ Objectivec
constructor
A new instance of Objectivec.
- #instance_variables ⇒ Object
- #interface_methods ⇒ Object
- #protocols ⇒ Object
- #ui? ⇒ Boolean
Methods inherited from Object
available_classes, create, #fetch_child, #push_child, #templates
Methods included from Class
#class_methods, #class_variables, #imports, #instance_methods
Constructor Details
#initialize(name = nil) ⇒ Objectivec
Returns a new instance of Objectivec.
13 14 15 16 |
# File 'lib/jaspion/miya/objectivec.rb', line 13 def initialize(name = nil) super(name) @xib_reference = true end |
Instance Attribute Details
#xib_reference ⇒ Object Also known as: xib_reference?
Returns the value of attribute xib_reference.
10 11 12 |
# File 'lib/jaspion/miya/objectivec.rb', line 10 def xib_reference @xib_reference end |
Instance Method Details
#instance_variables ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/jaspion/miya/objectivec.rb', line 18 def instance_variables str = super if xib_reference? && ui? str << "\n IBOutlet @property (nonatomic, weak)" else str << "\n @property (nonatomic, strong)" end str << " #{type} *#{name.uncapitalize};" str end |
#interface_methods ⇒ Object
29 30 31 |
# File 'lib/jaspion/miya/objectivec.rb', line 29 def interface_methods '' end |
#protocols ⇒ Object
33 34 35 |
# File 'lib/jaspion/miya/objectivec.rb', line 33 def protocols [] end |
#ui? ⇒ Boolean
37 38 39 |
# File 'lib/jaspion/miya/objectivec.rb', line 37 def ui? self.class.name.include?('View') end |