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
150 151 152 153 |
# File 'lib/cplus2ruby/model.rb', line 150 def method(name, *args) = parse_method_args(args) ann! name, Cplus2Ruby::Method, end |
#property(name, type = Object, options = {}) ⇒ Object
141 142 143 144 145 |
# File 'lib/cplus2ruby/model.rb', line 141 def property(name, type=Object, ={}) raise ArgumentError if [:type] [:type] = type ann! name, Cplus2Ruby::Property, end |
#static_method(name, *args) ⇒ Object
155 156 157 158 159 |
# File 'lib/cplus2ruby/model.rb', line 155 def static_method(name, *args) = parse_method_args(args) [:static] = true ann! name, Cplus2Ruby::Method, end |
#stub_method(name, *args) ⇒ Object
161 162 163 164 165 |
# File 'lib/cplus2ruby/model.rb', line 161 def stub_method(name, *args) = parse_method_args(args) [:stub] = true ann! name, Cplus2Ruby::Method, end |
#virtual(*virtuals) ⇒ Object
169 170 171 172 173 |
# File 'lib/cplus2ruby/model.rb', line 169 def virtual(*virtuals) virtuals.each do |name| ann! name, :virtual => true end end |