Module: Cplus2Ruby::Entity
- Defined in:
- lib/cplus2ruby/model.rb
Instance Method Summary collapse
-
#method(name, *args) ⇒ Object
(also: #method_c)
method :name, hash, hash, …, hash, body, hash.
- #property(name, type = Object, options = {}) ⇒ Object
- #static_method(name, *args) ⇒ Object
- #stub_method(name, *args) ⇒ Object
- #virtual(*virtuals) ⇒ Object
Instance Method Details
#method(name, *args) ⇒ Object Also known as: method_c
method :name, hash, hash, …, hash, body, hash
156 157 158 159 |
# File 'lib/cplus2ruby/model.rb', line 156 def method(name, *args) = parse_method_args(args) ann! name, Cplus2Ruby::Method, end |
#property(name, type = Object, options = {}) ⇒ Object
146 147 148 149 150 151 |
# File 'lib/cplus2ruby/model.rb', line 146 def property(name, type=Object, ={}) raise ArgumentError if [:type] [:type] = type || Object [:order] = Cplus2Ruby.model.next_prop_cnt ann! name, Cplus2Ruby::Property, end |
#static_method(name, *args) ⇒ Object
161 162 163 164 165 |
# File 'lib/cplus2ruby/model.rb', line 161 def static_method(name, *args) = parse_method_args(args) [:static] = true ann! name, Cplus2Ruby::Method, end |
#stub_method(name, *args) ⇒ Object
167 168 169 170 171 |
# File 'lib/cplus2ruby/model.rb', line 167 def stub_method(name, *args) = parse_method_args(args) [:stub] = true ann! name, Cplus2Ruby::Method, end |
#virtual(*virtuals) ⇒ Object
175 176 177 178 179 |
# File 'lib/cplus2ruby/model.rb', line 175 def virtual(*virtuals) virtuals.each do |name| ann! name, :virtual => true end end |