Class: OBSWS::Mixin::MetaObject
- Inherits:
-
Object
- Object
- OBSWS::Mixin::MetaObject
- Includes:
- Meta
- Defined in:
- lib/obsws/mixin.rb
Instance Method Summary collapse
- #attrs ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(resp, fields) ⇒ MetaObject
constructor
A new instance of MetaObject.
Methods included from Meta
Constructor Details
#initialize(resp, fields) ⇒ MetaObject
Returns a new instance of MetaObject.
17 18 19 20 21 |
# File 'lib/obsws/mixin.rb', line 17 def initialize(resp, fields) @resp = resp @fields = fields make_field_methods(*fields) end |
Instance Method Details
#attrs ⇒ Object
25 |
# File 'lib/obsws/mixin.rb', line 25 def attrs = @fields.map { |f| f.to_s.snakecase } |
#empty? ⇒ Boolean
23 |
# File 'lib/obsws/mixin.rb', line 23 def empty? = @fields.empty? |