るりまサーチ

最速Rubyリファレンスマニュアル検索!
60件ヒット [1-60件を表示] (0.014秒)
トップページ > クエリ:>>[x] > クエリ:attr[x]

別のキーワード

  1. _builtin >>
  2. date >>
  3. ipaddr >>
  4. bn >>
  5. status >>

検索結果

Net::IMAP::FetchData#attr -> { String => object } (18113.0)

各メッセージのアトリビュートの値をハッシュテーブルで返します。

...TypeMessage, Net::IMAP::BodyTypeMultipart
のいずれか。
: BODY[<section>]<<partial>>
section で指定されたセクションのボディの内容。文字列。
: BODY.PEEK[<section>]<<partial>>
section で指定されたセクションのメッセージボディの内容。文字...

REXML::Element#each_element_with_attribute(key, value = nil, max = 0, name = nil) {|element| ... } -> () (6142.0)

特定の属性を持つすべての子要素を引数としてブロックを呼び出します。

...ement_with_attribute('id'){|e| p e }
# >> <b id='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1', 1){|e| p e }
# >> <b id='1'/>
doc.root.each_element_with_attribute('id',...
...'1', 0, 'd'){|e| p e }
# >> <d id='1'/>
//}...

rexml/parsers/streamparser (144.0)

ストリーム式の XML パーサ。

...ener
def initialize
@events = []
end

def text(text)
@events << "text[#{text}]"
end

def tag_start(name, attrs)
@events << "tag_start[#{name}]"
end

attr
_reader :events
end

xml = <<EOS
<members>
<member name="apple" color="red">
<comment>comment here</comment>
</me...
...w).parse
# >> [:xmldecl, "1.0", "UTF-8", nil]
# >> [:text, "\n"]
# >> [:instruction, "xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> [:text, "\n"]
# >> [:doctype, "root", "SYSTEM", "foo", nil]
# >> [:elementdecl, "<!ELEMENT root (a+)"]
# >> [:elementdecl, "<!ELEMENT a"]
# >> [:entity...
...decl, ["bar", "barbarbarbar"]]
# >> [:attlistdecl, "a", {"att"=>nil, "xyz"=>"foobar"}, " \n <!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"]
# >> [:notationdecl, ["foobar", "SYSTEM", nil, "http://example.org/foobar.dtd"]]
# >> [:entitydecl, ["HTMLsymbol", "PUBLIC", "-//W3C//ENTITIES Symbols...

演算子式 (24.0)

演算子式 * assign * selfassign * multiassign * range * range_cond * and * or * not * cond

...! ~
**
-(単項)
* / %
+ -
<< >>
&
| ^
> >
= < <=
<=> == === != =~ !~
&&
||
.. ......
...単項演算子 +, - を表しメソッド定義
などではこの記法を利用します。


//emlist{
| ^ & <=> == === =~ > >= < <= << >>
+ - * / % ** ~ +@ -@ [] []= ` ! != !~
//}
これらの演算子式の定義方法についてはd:spec/def#operato...
...= C.new
c.foo = 5 # c.foo=( 5 ) のように変換される
p c.foo # => 5
//}

属性は Module#attr を使って同じように定義できます。

//emlist[例][ruby]{
class C
attr
:foo, true
end
c = C.new
c.foo = 5 # c.foo=( 5 ) のように変換される
p c.foo # => 5
//}

=...

ruby 1.6 feature (18.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...Fixnum#>>, <<

負の数に対して右シフトすると 0 になることがありました。
((<ruby-bugs-ja:PR#247>))

負の数を引数にした左シフト(つまり右シフト)も同様におかしな挙動をして
いました。((<ruby-bugs-ja:PR#248>))

p(-1 >> 31)...
...ことがありました。((<ruby-dev:13752>))

: attr_*

アクセサに余計な引数を渡してもエラーになりませんでした。
((<ruby-dev:13748>))

class C
def initialize
@message = 'ok'
end
attr
_reader :message
end
puts C.new.message(1,2,3...

絞り込み条件を変える