Class: Yara::Match
- Inherits:
-
Object
- Object
- Yara::Match
- Defined in:
- ext/yara_native/Match.c,
lib/yara.rb,
ext/yara_native/Match.c
Overview
Encapsulates a match object returned from Yara::Rules#scan_string or Yara::Rules#scan_file. A Match contains one or more MatchString objects.
Instance Method Summary collapse
-
#meta ⇒ Hash
call-seq: match.meta() -> Hash.
-
#namespace ⇒ String
call-seq: match.namespace() -> String.
-
#rule ⇒ String
call-seq: match.rule() -> String.
-
#strings ⇒ Yara::MatchString
call-seq: match.strings() -> Array.
-
#tags ⇒ String
call-seq: match.tags() -> Array.
- #to_hash ⇒ Object
Instance Method Details
#meta ⇒ Hash
call-seq:
match.() -> Hash
241 242 243 244 245 |
# File 'ext/yara_native/Match.c', line 241 static VALUE (VALUE self) { match_info *mi; Data_Get_Struct(self, match_info, mi); return mi->; } |
#namespace ⇒ String
call-seq:
match.namespace() -> String
199 200 201 202 203 |
# File 'ext/yara_native/Match.c', line 199 static VALUE match_namespace(VALUE self) { match_info *mi; Data_Get_Struct(self, match_info, mi); return mi->namespace; } |
#rule ⇒ String
call-seq:
match.rule() -> String
185 186 187 188 189 |
# File 'ext/yara_native/Match.c', line 185 static VALUE match_rule(VALUE self) { match_info *mi; Data_Get_Struct(self, match_info, mi); return mi->rule; } |
#strings ⇒ Yara::MatchString
call-seq:
match.strings() -> Array
227 228 229 230 231 |
# File 'ext/yara_native/Match.c', line 227 static VALUE match_strings(VALUE self) { match_info *mi; Data_Get_Struct(self, match_info, mi); return mi->strings; } |
#tags ⇒ String
call-seq:
match.() -> Array
213 214 215 216 217 |
# File 'ext/yara_native/Match.c', line 213 static VALUE (VALUE self) { match_info *mi; Data_Get_Struct(self, match_info, mi); return mi->; } |
#to_hash ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/yara.rb', line 25 def to_hash { :rule => self.rule, :namespace => self.namespace, :tags => self., :meta => self., :strings => self.strings } end |